From 9d883a4c050a5d3e42855debc23ec8d3149cbc4c Mon Sep 17 00:00:00 2001 From: Godwin Date: Sun, 23 Jul 2017 08:53:30 -0700 Subject: [PATCH] Fixed deployments --- Rakefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index bf6a490..ecb36e1 100644 --- a/Rakefile +++ b/Rakefile @@ -93,12 +93,12 @@ namespace :deployment do task pull: :environment do branch = Rails.env.production? ? :master : :development `git reset --hard origin/#{branch}` - raise "\nPull failed" $?.exitstatus > 0 + raise "\nPull failed" if $?.exitstatus > 0 changed = !(`git pull` =~ /Already up to date/) - raise "\nPull failed" $?.exitstatus > 0 + raise "\nPull failed" if $?.exitstatus > 0 `bundle install --no-deployment && bundle update bundle install --deployment` - raise "\nPull failed" $?.exitstatus > 0 + raise "\nPull failed" if $?.exitstatus > 0 end task update: :environment do @@ -112,7 +112,7 @@ namespace :deployment do ] cmd = tasks.map { |t| "RAILS_ENV=#{Rails.env} bundle exec #{t}"}.join(' && ') `#{cmd}` - raise "\nUpdate failed" $?.exitstatus > 0 + raise "\nUpdate failed" if $?.exitstatus > 0 end task bounce: :environment do @@ -137,7 +137,7 @@ namespace :deployment do end end - task db: :start do + task start: :environment do [ :pull, :update,