Capistrano::Configuration.instance(:must_exist).load do namespace :newrelic do task :set_revision do set_branch set( :newrelic_revision, branch ) if branch[0,1] == 'v' end end end