Sha256: 0923a5d5b524b4acb2c799f57ac4019a1f6242ed4c5e61d06ab7d0ad31f06682

Contents?: true

Size: 545 Bytes

Versions: 56

Compression:

Stored size: 545 Bytes

Contents

namespace :deploy do
  desc "checks whether the currently checkout out revision matches the
        remote one we're trying to deploy from"
  task :check_revision do
    branch = fetch(:branch)
    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 or make sure you've"
      puts "checked out the branch: #{branch} as you can only deploy"
      puts "if you've got the target branch checked out"
      exit
    end
  end
end

Version data entries

56 entries across 56 versions & 4 rubygems

Version Path
capistrano-cookbook-5.0.2 lib/capistrano/cookbook/tasks/check_revision.cap
capistrano-cookbook-5.0.1 lib/capistrano/cookbook/tasks/check_revision.cap
capistrano-cookbook-5.0.0 lib/capistrano/cookbook/tasks/check_revision.cap
meataxe-0.6.2 lib/meataxe/capistrano/tasks/check_revision.cap
meataxe-0.5.0 lib/meataxe/capistrano/tasks/check_revision.cap
teleporter-2.0.11 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.10 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.9 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.8 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.7 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.6 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.4 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.2 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.1 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-2.0.0 lib/generators/teleport/templates/capistrano/tasks/check_revision.rake
teleporter-1.2.4 lib/generators/initial/templates/capistrano/tasks/check_revision.rake
teleporter-1.2.3 lib/generators/initial/templates/capistrano/tasks/check_revision.rake
teleporter-1.2.2 lib/generators/initial/templates/capistrano/tasks/check_revision.rake
teleporter-1.2.1 lib/generators/initial/templates/capistrano/tasks/check_revision.rake
teleporter-1.1.1 lib/generators/initial/templates/capistrano/tasks/check_revision.rake