1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Merge pull request #781 from mikespokefire/feature/fix-symlink-roles

Symlinks should happen on all roles, not just app
This commit is contained in:
Tom Clements 2013-11-22 04:59:44 -08:00
commit dfe25c9436
2 changed files with 6 additions and 5 deletions

View file

@ -8,6 +8,7 @@ Reverse Chronological Order:
## `3.1.0` (not released)
* Tasks that used `linked_dirs` and `linked_files` now run on all roles, not just app roles (@mikespokefire)
* Tasks `deploy:linked_dirs`, `deploy:make_linked_dirs`, `deploy:linked_files`, `deploy:cleanup_rollback`,
`deploy:log_revision` and `deploy:revert_release` now use `release_roles()` not `roles()` meaning that they
will only run on servers where the `no_release` property is not falsy. (@leehambley)

View file

@ -49,7 +49,7 @@ namespace :deploy do
desc 'Check directories to be linked exist in shared'
task :linked_dirs do
next unless any? :linked_dirs
on release_roles :app do
on release_roles :all do
execute :mkdir, '-pv', linked_dirs(shared_path)
end
end
@ -57,7 +57,7 @@ namespace :deploy do
desc 'Check directories of files to be linked exist in shared'
task :make_linked_dirs do
next unless any? :linked_files
on release_roles :app do |host|
on release_roles :all do |host|
execute :mkdir, '-pv', linked_file_dirs(shared_path)
end
end
@ -65,7 +65,7 @@ namespace :deploy do
desc 'Check files to be linked exist in shared'
task :linked_files do
next unless any? :linked_files
on release_roles :app do |host|
on release_roles :all do |host|
linked_files(shared_path).each do |file|
unless test "[ -f #{file} ]"
error t(:linked_file_does_not_exist, file: file, host: host)
@ -94,7 +94,7 @@ namespace :deploy do
desc 'Symlink linked directories'
task :linked_dirs do
next unless any? :linked_dirs
on release_roles :app do
on release_roles :all do
execute :mkdir, '-pv', linked_dir_parents(release_path)
fetch(:linked_dirs).each do |dir|
@ -113,7 +113,7 @@ namespace :deploy do
desc 'Symlink linked files'
task :linked_files do
next unless any? :linked_files
on release_roles :app do
on release_roles :all do
execute :mkdir, '-pv', linked_file_dirs(release_path)
fetch(:linked_files).each do |file|