Skip to content

Commit

Permalink
Add warning for unsupported cap versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Kayser committed Feb 14, 2009
1 parent 325951c commit 60854fa
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions lib/new_relic/recipes.rb
Expand Up @@ -40,10 +40,10 @@
end
new_revision = rev || source.query_revision(source.head()) { |cmd| `#{cmd}` }
deploy_options = { :environment => rails_env,
:revision => new_revision,
:changelog => changelog,
:description => description,
:appname => appname }
:revision => new_revision,
:changelog => changelog,
:description => description,
:appname => appname }
logger.debug "Uploading deployment to New Relic"
deployment = NewRelic::Commands::Deployments.new deploy_options
deployment.run
Expand All @@ -62,10 +62,13 @@
end
end
end

instance = Capistrano::Configuration.instance
if instance
instance.load &make_notify_task
if Capistrano::Version::MAJOR < 2
STDERR.puts "Unable to load #{__FILE__}\nNew Relic Capistrano hooks require at least version 2.0.0"
else
make_notify_task.call
end
instance = Capistrano::Configuration.instance
if instance
instance.load &make_notify_task
else
make_notify_task.call
end
end

0 comments on commit 60854fa

Please sign in to comment.