Reputation: 4381
Given a simple web application deployed via Capistrano. There's a build process in a script build.sh
called from deploy/deploy.rb
:
namespace :deploy do
task :build do
system "cd web && ./build.sh"
end
before :starting, :build
...
end
How would I configure Capistrano to abort my cap prd deploy
immediately upon receiving an exit code 1 from the system
command inside of the block?
Upvotes: 1
Views: 470
Reputation: 4381
system
is the wrong choice of command.
Inside of the task :build
block, use the sh
method instead of system
.
sh "cd web && ./build.sh"
Upvotes: 1