Skip to content

Commit

Permalink
#4 and #5
Browse files Browse the repository at this point in the history
Removed hook
Revision is configurable
  • Loading branch information
seuros committed Mar 1, 2014
1 parent 36ba70d commit 708174a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@ Configurable options, shown here with defaults:
# Deploy user if set will be used instead of the VCS user.
set :newrelic_deploy_user

## Changelog
0.0.8:
- Hook was removed, please set it in your deploy.rb or deploy/'stage'.rb
```ruby
namespace :deploy do
before :finished, 'newrelic:notice_deployment'
end
```
- Revision can be set with :
```ruby
set :newrelic_revision, "Your text here"
```
or
```shell
$ NEWRELIC_REVISION='Your text here' bundle exe cap ....
```

## Contributors

- [Bryan Ricker] (https://github.com/bricker)
Expand Down
2 changes: 1 addition & 1 deletion lib/capistrano/newrelic/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Capistrano
module NewRelic
VERSION = '0.0.7'
VERSION = '0.0.8'
end
end
9 changes: 3 additions & 6 deletions lib/capistrano/tasks/newrelic.cap
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
namespace :deploy do
before :finished, 'newrelic:notice_deployment'
end

namespace :load do
task :defaults do
set :newrelic_env, fetch(:stage, fetch(:rack_env, fetch(:rails_env, 'production')))
set :newrelic_env, fetch(:stage, fetch(:rack_env, fetch(:rails_env, fetch(:stage))))
set :_newrelic_revision, -> { ENV['NEWRELIC_REVISION'] || fetch(:newrelic_revision, release_timestamp.strip) }
end
end

Expand All @@ -15,7 +12,7 @@ namespace :newrelic do
run_locally do
deploy_options = {
:environment => fetch(:newrelic_env),
:revision => release_timestamp.strip,
:revision => fetch(:_newrelic_revision),
:changelog => fetch(:newrelic_changelog),
:description => fetch(:newrelic_desc),
:user => fetch(:newrelic_deploy_user)
Expand Down

0 comments on commit 708174a

Please sign in to comment.