Skip to content

Instantly share code, notes, and snippets.

@YmerejRedienhcs
Created February 14, 2014 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YmerejRedienhcs/8994285 to your computer and use it in GitHub Desktop.
Save YmerejRedienhcs/8994285 to your computer and use it in GitHub Desktop.
before :updating, :ask_for_deploy_configuration do
ask :branch, ENV['CODE_BRANCH'] || 'master'
ask :revision, ENV['CODE_REVISION'] || %x[git rev-parse --short #{fetch :branch}].strip
set :branch_name, fetch(:branch)
set :branch, fetch(:revision)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment