alpha_omega 0.0.167 → 0.0.168

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/alpha_omega/deploy.rb +13 -8
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.167
1
+ 0.0.168
@@ -294,7 +294,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
294
294
 
295
295
  task :symlink_next do
296
296
  if releases.length >= 2
297
- run "ln -vnfs #{current_release} #{next_path}"
297
+ run "ln -vnfs #{current_release} #{next_path}.new"
298
+ run "mv -T #{next_path}.new #{next_path}"
298
299
  end
299
300
  end
300
301
 
@@ -311,16 +312,17 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
311
312
  if releases.length > 0
312
313
  on_rollback do
313
314
  if rollback_release
314
- run "rm -fv #{previous_path} #{next_path}; true"
315
- run "ln -vnfs #{rollback_release} #{current_path}.new; true"
316
- run "mv -T #{current_path}.new #{current_path}; true"
315
+ run "rm -fv #{previous_path} #{next_path}"
316
+ run "ln -vnfs #{rollback_release} #{current_path}.new"
317
+ run "mv -T #{current_path}.new #{current_path}"
317
318
  else
318
319
  logger.important "no previous release to rollback to, rollback of symlink skipped"
319
320
  end
320
321
  end
321
322
 
322
323
  if releases.length == 1
323
- run "ln -vnfs #{current_release} #{current_path}"
324
+ run "ln -vnfs #{current_release} #{current_path}.new"
325
+ run "mv -T #{current_path}.new #{current_path}"
324
326
  else
325
327
  run "rm -fv #{previous_path} #{next_path}"
326
328
  run "ln -vnfs #{current_release} #{current_path}.new"
@@ -329,7 +331,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
329
331
  run "#{File.dirname(external_path).index(deploy_to) == 0 ? "" : try_sudo} ln -vnfs #{current_path} #{external_path}.new"
330
332
  run "#{File.dirname(external_path).index(deploy_to) == 0 ? "" : try_sudo} mv -T #{external_path}.new #{external_path}"
331
333
  end
332
- run "ln -vnfs #{rollback_release} #{previous_path}"
334
+ run "ln -vnfs #{rollback_release} #{previous_path}.new"
335
+ run "mv -T #{previous_path}.new #{previous_path}"
333
336
  end
334
337
 
335
338
  system "#{figlet} -w 200 #{current_release_name} activated"
@@ -399,7 +402,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
399
402
  set :deploy_path_name, "compare"
400
403
  set :deploy_release_name, "compare"
401
404
  update_code
402
- run "ln -vnfs #{deploy_release} #{deploy_path}"
405
+ run "ln -vnfs #{deploy_release} #{deploy_path}.new"
406
+ run "mv -T #{deploy_path}.new #{deploy_path}"
403
407
  end
404
408
 
405
409
  namespace :rollback do
@@ -458,7 +462,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
458
462
  set :deploy_path_name, "migrate"
459
463
  set :deploy_release_name, "migrate"
460
464
  update_code
461
- run "ln -vnfs #{deploy_release} #{deploy_path}"
465
+ run "ln -vnfs #{deploy_release} #{deploy_path}.new"
466
+ run "mv -T #{deploy_path}.new #{deploy_path}"
462
467
  end
463
468
 
464
469
  desc <<-DESC
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: 337
4
+ hash: 335
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 167
10
- version: 0.0.167
9
+ - 168
10
+ version: 0.0.168
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem