SX cap production setup files

This commit is contained in:
Min Zeya Phyo
2019-10-25 12:33:21 +06:30
parent b931ad709d
commit 0be67f4f12
10 changed files with 182 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
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 #{branch}`
puts "WARNING: HEAD is not the same as #{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