Sha256: edecb1758c024994da094f69e65b1284acab03f85d937f734ed69335f70978fb

Contents?: true

Size: 520 Bytes

Versions: 3

Compression:

Stored size: 520 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do
  namespace :check do
    desc "Make sure local git is in sync with remote."
    task :revision, roles: :web do
      unless `git rev-parse HEAD` == `git rev-parse origin/#{branch}`
        puts "WARNING: HEAD is not the same as origin/#{branch}"
        puts "Run `git push` to sync changes."
        exit
      end
    end
    before "deploy", "check:revision"
    before "deploy:migrations", "check:revision"
    before "deploy:cold", "check:revision"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cap_bootstrap-0.3.0 lib/cap_bootstrap/recipes/check.rb
cap_bootstrap-0.2 lib/cap_bootstrap/recipes/check.rb
cap_bootstrap-0.1 lib/cap_bootstrap/recipes/check.rb