alpha_omega 0.0.220 → 0.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/alpha_omega/deploy.rb +5 -9
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.222
|
data/lib/alpha_omega/deploy.rb
CHANGED
@@ -33,6 +33,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
33
33
|
# are not sufficient.
|
34
34
|
# =========================================================================
|
35
35
|
|
36
|
+
_cset :skip_scm, false
|
36
37
|
_cset :scm, :git
|
37
38
|
_cset :deploy_via, :checkout
|
38
39
|
_cset(:branch) { AlphaOmega.what_branch }
|
@@ -278,11 +279,11 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
278
279
|
task :bootstrap_code do
|
279
280
|
if releases.length < 2 # without services and run as root
|
280
281
|
run "[[ -d #{deploy_to} ]] || #{try_sudo} install -d -m #{dir_perms} #{try_sudo.empty? ? '' : "-o #{root_user} -g #{root_group}"} #{deploy_to}"
|
281
|
-
run "#{try_sudo} install -d -m #{dir_perms}
|
282
|
+
run "#{try_sudo} install -d -m #{dir_perms}#{try_sudo.empty? ? '' : " -o #{user} -g #{group}"} #{releases_path} #{deploy_to}/#{log_dir} #{deploy_to}/#{cache_dir} #{deploy_to}/#{service_dir}"
|
282
283
|
else
|
283
284
|
dirs = [ releases_path, service_path, log_path, cache_path ]
|
284
285
|
dir_args = dirs.map {|d| d.sub("#{deploy_to}/", "") }.join(' ')
|
285
|
-
run "#{try_sudo} install -d -m #{dir_perms}
|
286
|
+
run "#{try_sudo} install -d -m #{dir_perms}#{try_sudo.empty? ? '' : " -o #{user} -g #{group}"} #{deploy_to}"
|
286
287
|
run "cd #{deploy_to} && install -d -m #{dir_perms} #{dir_args}"
|
287
288
|
end
|
288
289
|
end
|
@@ -295,8 +296,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
295
296
|
task (if you want to perform the `restart' task separately).
|
296
297
|
DESC
|
297
298
|
task :update_code do
|
298
|
-
|
299
|
-
strategy.deploy!
|
299
|
+
strategy.deploy! unless skip_scm
|
300
300
|
bundle
|
301
301
|
cook
|
302
302
|
unless deploy_path_name == migrate_path_name
|
@@ -589,15 +589,11 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
589
589
|
abort
|
590
590
|
end
|
591
591
|
|
592
|
-
run_script = <<-SCRIPT
|
593
|
-
echo #{epoch} #{ENV['AO_USER']} > #{lock_path};
|
594
|
-
SCRIPT
|
595
|
-
|
596
592
|
if want_unlock
|
597
593
|
at_exit { self.unlock; }
|
598
594
|
end
|
599
595
|
|
600
|
-
run
|
596
|
+
run "echo #{epoch} #{ENV['AO_USER']} > #{lock_path}"
|
601
597
|
end
|
602
598
|
|
603
599
|
task :lock_compare do
|