Skip to content

Commit

Permalink
Capistrano deploy_notice doesn't extract changelog w/out revisions
Browse files Browse the repository at this point in the history
Ensure we have a value for the current/previous revisions before attempting to pull the changelog for revisions "previous..current".  Fixes error `fatal: ..: '..' is outside repository` produced by string wil nil values for both.
  • Loading branch information
wpeterson authored and kwugirl committed Dec 19, 2016
1 parent acd4ff7 commit cf9cc76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/new_relic/recipes/capistrano3.rb
Expand Up @@ -63,9 +63,11 @@ def send_deployment_notification_to_newrelic
end

def lookup_changelog
debug "Retrieving changelog for New Relic Deployment details"
previous_revision = fetch(:previous_revision)
current_revision = fetch(:current_revision)
return unless current_revision && previous_revision

debug "Retrieving changelog for New Relic Deployment details"

if scm == :git
log_command = "git --no-pager log --no-color --pretty=format:' * %an: %s' " +
Expand Down

0 comments on commit cf9cc76

Please sign in to comment.