Skip to content
Browse files

Whoops. This should be dirs.join(" "), not dirs.joins("")

  • Loading branch information...
1 parent 663eef8 commit b1e7fa0d1915e606926d87e4254f3e630dd19386 @omarqureshi committed Jun 7, 2012
Showing with 19 additions and 19 deletions.
  1. +19 −19 lib/edison_tools/capistrano.rb
View
38 lib/edison_tools/capistrano.rb
@@ -13,19 +13,19 @@
task :setup, :except => { :no_release => true } do
dirs = [deploy_to]
dirs += shared_children.map { |d| File.join(shared_path, d) }
- run "mkdir -p #{dirs.join('')} && chmod g+w #{dirs.join('')}"
+ run "mkdir -p #{dirs.join(' ')} && chmod g+w #{dirs.join(' ')}"
run "mkdir -p #{shared_path}/log"
run "mkdir -p #{shared_path}/pids"
run "mkdir -p #{shared_path}/tmp"
run "mkdir -p #{shared_path}/tmp/sockets"
run "git clone -b #{branch} #{repository} #{current_path}"
end
-
+
task :cold do
update
migrate
end
-
+
task :update do
transaction do
update_code
@@ -46,15 +46,15 @@
migrate
god.restart_unicorn
end
-
+
task :update_file_server, :roles => :file do
update_code
end
-
-
+
+
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{latest_release}" 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 #{latest_release}/log #{latest_release}/public/system #{latest_release}/tmp/pids &&
@@ -71,11 +71,11 @@
run "find #{asset_paths} -exec touch -t #{stamp} {} ';'; true", :env => { "TZ" => "UTC" }
end
end
-
-
+
+
# Managing crontab file manually now on server
# see schedule.rb for crons
-
+
namespace :web do
desc "Disables the website by putting the maintenance files live."
task :disable, :roles => :web do
@@ -92,24 +92,24 @@
run "cp -r #{release_path}/public/maintenance #{shared_path}/system/"
end
end
-
-
+
+
desc 'Run the migrations under the current stage.'
task :migrate, :roles => :db, :only => { :primary => true } do
run "cd #{release_path}; bundle exec rake RAILS_ENV=#{stage} db:migrate"
end
-
+
namespace :rollback do
desc "Moves the repo back to the previous version of HEAD"
task :repo, :except => { :no_release => true } do
set :branch, "HEAD@{1}"
deploy.default
end
-
+
desc "Rewrite reflog so HEAD@{1} will continue to point to at the next previous release."
task :cleanup, :except => { :no_release => true } do
run "cd #{current_path}; git reflog delete --rewrite HEAD@{1}; git reflog delete --rewrite HEAD@{1}"end
-
+
desc "Rolls back to the previously deployed version."
task :default do
rollback.repo
@@ -122,12 +122,12 @@
task :restart_unicorn, :roles => :app do
sudo "/usr/bin/god restart unicorn"
end
-
+
desc "Start god"
task :start, :roles => :app do
sudo "/etc/init.d/god start"
end
-
+
desc "Quit god, but not the processes it's monitoring"
task :stop, :roles => :app do
begin
@@ -136,11 +136,11 @@
puts 'There is no God'
end
end
-
+
desc "Describe the status of the running tasks"
task :status, :roles => :app do
sudo "/usr/bin/god status"
end
end
-
+
end

0 comments on commit b1e7fa0

Please sign in to comment.
Something went wrong with that request. Please try again.