ivey (owner)

Revisions

gist: 68496 Download_button fork
public
Public Clone URL: git://gist.github.com/68496.git
Embed All Files: show embed
deploy.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
namespace :git do
  task :unpushed do
    ahead = `git log origin/#{branch}..#{branch} --pretty=oneline --abbrev-commit`
    unless ahead == ""
      puts "Whoa, hoss. Looks like you forgot to push the following SHAs:"
      puts ahead
      print "Continue with the deploy anyway? [y/N] "
      if $stdin.gets.chomp.upcase != "Y"
        puts "Good call. `git push` and come back."
        exit
      end
    end
  end
end
before "deploy:update_code", "git:unpushed"