Created
September 30, 2015 06:14
-
-
Save amaudy/2a98f19dd51f65806d86 to your computer and use it in GitHub Desktop.
Get latest revision that deployed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this snippet to config/deploy.rb | |
# then call via Capistrano Rake task | |
# bundle exec cap staging latest_revision | |
desc "View latest commit that deploy on server" | |
task :latest_revision, :roles => :app do | |
trap("INT") { puts 'Interupted'; exit 0; } | |
run "cat #{deploy_to}/current/REVISION" do |channel, stream, data| | |
puts | |
puts "******* REVISION ********" | |
puts "Server : #{channel[:host]}" | |
puts "Revision : #{data}" | |
puts "*************************" | |
puts | |
break if stream == :err | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment