Skip to content

Commit

Permalink
Revert "use default bundle_path in deployment"
Browse files Browse the repository at this point in the history
Thanks to @pjungwir
Close capistrano#71

This reverts commit 9414388.

Conflicts:
	CHANGELOG.md
	lib/capistrano/tasks/bundler.cap
  • Loading branch information
kirs committed Jun 24, 2015
1 parent 60686eb commit 6b23e52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
5 changes: 0 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
(master)

* Use `bundle check` to check if we can skip `bundle install`
* Add `vendor/bundle/` to `linked_dirs`.
* Set default for `bundle_path` to `nil`, which means Bundler chooses `vendor/bundle/`.
* If you did not change the default `bundle_path` make sure to cleanup the
old bundle path `shared/bundle/` which is now unused. The new default is
`shared/vendor/bundle/`.

# 1.1.4 (22 Jan 2014)

Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ set :bundle_roles, :all # this is defaul
set :bundle_servers, -> { release_roles(fetch(:bundle_roles)) } # this is default
set :bundle_binstubs, -> { shared_path.join('bin') } # default: nil
set :bundle_gemfile, -> { release_path.join('MyGemfile') } # default: nil
set :bundle_path, -> { shared_path.join('my_special_bundle') } # default: nil
set :bundle_path, -> { shared_path.join('bundle') } # this is default
set :bundle_without, %w{development test}.join(' ') # this is default
set :bundle_flags, '--deployment --quiet' # this is default
set :bundle_env_variables, {} # this is default
Expand All @@ -72,11 +72,6 @@ To generate binstubs on each deploy, set `:bundle_binstubs` path:
set :bundle_binstubs, -> { shared_path.join('bin') }
```

Bundler uses `vendor/bundle/` as path for gems if called with `--deployment`.
Therefore this gem adds that path to `linked_dirs`. See the [Bundler
documentation](http://bundler.io/v1.7/man/bundle-install.1.html#DEPLOYMENT-MODE)
for details.

In the result this would execute the following bundle command on all servers
(actual paths depend on the real deploy directory):

Expand Down
6 changes: 3 additions & 3 deletions lib/capistrano/tasks/bundler.cap
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace :bundler do
set :bundle_servers, -> { release_roles(fetch(:bundle_roles)) }
set :bundle_binstubs, -> { shared_path.join('bin') }
set :bundle_gemfile, -> { release_path.join('Gemfile') }
set :bundle_path, -> { shared_path.join('my_special_bundle') }
set :bundle_path, -> { shared_path.join('bundle') }
set :bundle_without, %w{development test}.join(' ')
set :bundle_flags, '--deployment --quiet'
set :bundle_jobs, nil
Expand Down Expand Up @@ -65,10 +65,10 @@ namespace :load do

set :bundle_roles, :all
set :bundle_servers, -> { release_roles(fetch(:bundle_roles)) }
set :bundle_path, nil
set :bundle_path, -> { shared_path.join('vendor/bundle') }
set :bundle_without, %w{development test}.join(' ')
set :bundle_flags, '--deployment --quiet'

set :linked_dirs, fetch(:linked_dirs, []) + %w(vendor/bundle .bundle)
set :linked_dirs, fetch(:linked_dirs, []) << '.bundle'
end
end

0 comments on commit 6b23e52

Please sign in to comment.