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

Make sure all directories exist on each deploy which are necessary for subsequent commands to succeed, since some SCM's won't save empty directories

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6918 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2007-06-01 03:04:20 +00:00
parent e581f83310
commit ef0c790bd5
2 changed files with 6 additions and 0 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Make sure all directories exist on each deploy which are necessary for subsequent commands to succeed, since some SCM's won't save empty directories [Matthew Elder]
* Add :default_environment variable, which is applied to every command

View file

@ -147,8 +147,12 @@ namespace :deploy do
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{release_path}" if fetch(:group_writable, true)
# mkdir -p is making sure that the directories are there for some SCM's that don't
# save empty folders
run <<-CMD
rm -rf #{release_path}/log #{release_path}/public/system #{release_path}/tmp/pids &&
mkdir -p #{release_path}/public &&
mkdir -p #{release_path}/tmp &&
ln -s #{shared_path}/log #{release_path}/log &&
ln -s #{shared_path}/system #{release_path}/public/system &&
ln -s #{shared_path}/pids #{release_path}/tmp/pids