Skip to content

Instantly share code, notes, and snippets.

@Narnach
Last active December 20, 2015 03:19
Show Gist options
  • Select an option

  • Save Narnach/6063039 to your computer and use it in GitHub Desktop.

Select an option

Save Narnach/6063039 to your computer and use it in GitHub Desktop.
deploy.rb replacement for semaphore continuous deployment
# 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