alpha_omega 0.0.159 → 0.0.160

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/alpha_omega/deploy.rb +8 -4
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.159
1
+ 0.0.160
@@ -316,7 +316,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
316
316
  on_rollback do
317
317
  if rollback_release
318
318
  run "rm -fv #{previous_path} #{next_path}; true"
319
- run "ln -vnfs #{rollback_release} #{current_path}; true"
319
+ run "ln -vnfs #{rollback_release} #{current_path}.new; true"
320
+ run "mv -T #{current_path}.new #{current_path}; true"
320
321
  else
321
322
  logger.important "no previous release to rollback to, rollback of symlink skipped"
322
323
  end
@@ -326,9 +327,11 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
326
327
  run "ln -vnfs #{current_release} #{current_path}"
327
328
  else
328
329
  run "rm -fv #{previous_path} #{next_path}"
329
- run "ln -vnfs #{current_release} #{current_path}"
330
+ run "ln -vnfs #{current_release} #{current_path}.new"
331
+ run "mv -T #{current_path}.new #{current_path}"
330
332
  if current_path != external_path
331
- run "#{File.dirname(external_path).index(deploy_to) == 0 ? "" : try_sudo} ln -vnfs #{current_path} #{external_path}"
333
+ run "#{File.dirname(external_path).index(deploy_to) == 0 ? "" : try_sudo} ln -vnfs #{current_path} #{external_path}.new"
334
+ run "#{File.dirname(external_path).index(deploy_to) == 0 ? "" : try_sudo} mv -T #{external_path}.new #{external_path}"
332
335
  end
333
336
  run "ln -vnfs #{rollback_release} #{previous_path}"
334
337
  end
@@ -414,7 +417,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
414
417
  system "#{figlet} -w 200 on #{previous_release_name}"
415
418
  run "rm -fv #{previous_path} #{next_path}"
416
419
 
417
- run "ln -vnfs #{previous_release} #{current_path}"
420
+ run "ln -vnfs #{previous_release} #{current_path}.new"
421
+ run "mv -T #{curent_path}.new #{current_path}"
418
422
  else
419
423
  abort "could not rollback the code because there is no prior release"
420
424
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_omega
3
3
  version: !ruby/object:Gem::Version
4
- hash: 289
4
+ hash: 351
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 159
10
- version: 0.0.159
9
+ - 160
10
+ version: 0.0.160
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem