Last active
December 20, 2015 03:19
-
-
Save Narnach/6063039 to your computer and use it in GitHub Desktop.
deploy.rb replacement for semaphore continuous deployment
This file contains hidden or 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
| # The *real* deploy.rb is located in config/deploy_semaphore.rb | |
| # | |
| # http://semaphoreapp.com performs continuous deployment for us, so we should not perform manual deployments. | |
| # This disables cap deploy, cap deploy:migrations and cap deploy:upload, our most frequently used tasks. | |
| # | |
| # On the semaphore side, use this as the deployment commands to make this work: | |
| # | |
| # mv config/deploy_semaphore.rb config/deploy.rb | |
| # bundle install --path vendor/bundle | |
| # bundle exec cap -S revision=$REVISION deploy:migrations | |
| # | |
| # Future updates to this deploy.rb template can be found in this gist: https://gist.github.com/Narnach/6063039 | |
| def semaphore_warning | |
| puts '*' * 80 | |
| puts "* Semaphore is deploying for us. Please don't attempt manual deployments" | |
| puts '*' * 80 | |
| exit 1 | |
| end | |
| namespace :deploy do | |
| task :default do | |
| semaphore_warning | |
| end | |
| task :migrations do | |
| semaphore_warning | |
| end | |
| task :upload do | |
| semaphore_warning | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment