Skip to content

Commit

Permalink
Fix banners 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Tsaplin committed Feb 7, 2012
1 parent d89a39b commit 3963661
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions config/deploy.rb
Expand Up @@ -41,6 +41,24 @@

set :unicorn_start_cmd, "(cd #{deploy_to}/current; rvm use 1.8.7 do bundle exec unicorn_rails -Dc #{unicorn_conf})"

after 'deploy:update_code' do
bundle_cmd = fetch(:bundle_cmd, "bundle")
bundle_flags = fetch(:bundle_flags, "--deployment --quiet")
bundle_dir = fetch(:bundle_dir, File.join(fetch(:shared_path), 'bundle'))
bundle_gemfile = fetch(:bundle_gemfile, "Gemfile")
bundle_without = [*fetch(:bundle_without, [:development, :test])].compact

args = ["--gemfile #{File.join(fetch(:current_release), bundle_gemfile)}"]
args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
args << bundle_flags.to_s
args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?


run_cmd = "cd \"#{fetch(:current_release)}\"; "
run_cmd << "#{bundle_cmd} install #{args.join(' ')}"

run run_cmd, :shell => '/bin/bash'
end


# - for unicorn - #
Expand Down

0 comments on commit 3963661

Please sign in to comment.