alpha_omega 0.0.153 → 0.0.154
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/alpha_omega/deploy/strategy/checkout.rb +1 -1
- data/lib/alpha_omega/deploy/strategy/remote.rb +1 -1
- data/lib/alpha_omega/deploy.rb +12 -23
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.154
|
@@ -11,7 +11,7 @@ module Capistrano
|
|
11
11
|
|
12
12
|
# Returns the SCM's checkout command for the revision to deploy.
|
13
13
|
def commands
|
14
|
-
@commands ||= source.checkout(revision, configuration[:
|
14
|
+
@commands ||= source.checkout(revision, configuration[:deploy_release])
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -35,7 +35,7 @@ module Capistrano
|
|
35
35
|
# Returns the command which will write the identifier of the
|
36
36
|
# revision being deployed to the REVISION file on each host.
|
37
37
|
def mark
|
38
|
-
"echo #{revision} > #{configuration[:
|
38
|
+
"echo #{revision} > #{configuration[:deploy_release]}/REVISION"
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
data/lib/alpha_omega/deploy.rb
CHANGED
@@ -74,6 +74,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
74
74
|
_cset :next_dir, "next"
|
75
75
|
_cset :compare_dir, "compare"
|
76
76
|
_cset :migrate_dir, "migrate"
|
77
|
+
_cset(:deploy_dir) { current_dir }
|
77
78
|
|
78
79
|
_cset :service_dir, "service"
|
79
80
|
_cset :log_dir, "log"
|
@@ -118,6 +119,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
118
119
|
}
|
119
120
|
_cset :compare_release_name, compare_dir
|
120
121
|
_cset :migrate_release_name, migrate_dir
|
122
|
+
_cset(:deploy_release_name) { current_release_name }
|
121
123
|
|
122
124
|
_cset(:releases_path) { File.join(deploy_to, releases_dir) }
|
123
125
|
_cset(:previous_path) { File.join(deploy_to, previous_dir) }
|
@@ -126,6 +128,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
126
128
|
_cset(:next_path) { File.join(deploy_to, next_dir) }
|
127
129
|
_cset(:compare_path) { File.join(deploy_to, compare_dir) }
|
128
130
|
_cset(:migrate_path) { File.join(deploy_to, migrate_dir) }
|
131
|
+
_cset(:deploy_path) { File.join(deploy_to, deploy_dir) }
|
129
132
|
|
130
133
|
_cset(:rollback_revision) { capture("cat #{rollback_release}/REVISION", :except => { :no_release => true }).strip }
|
131
134
|
_cset(:previous_revision) { capture("cat #{previous_release}/REVISION", :except => { :no_release => true }).strip }
|
@@ -133,6 +136,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
133
136
|
_cset(:next_revision) { capture("cat #{next_release}/REVISION", :except => { :no_release => true }).strip }
|
134
137
|
_cset(:compare_revision) { capture("cat #{compare_release}/REVISION", :except => { :no_release => true }).strip }
|
135
138
|
_cset(:migrate_revision) { capture("cat #{migrate_release}/REVISION", :except => { :no_release => true }).strip }
|
139
|
+
_cset(:deploy_revision) { capture("cat #{deploy_release}/REVISION", :except => { :no_release => true }).strip }
|
136
140
|
|
137
141
|
# formerly:
|
138
142
|
#
|
@@ -150,6 +154,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
150
154
|
_cset(:next_release) { File.join(releases_path, next_release_name) }
|
151
155
|
_cset(:compare_release) { File.join(releases_path, compare_release_name) }
|
152
156
|
_cset(:migrate_release) { File.join(releases_path, migrate_release_name) }
|
157
|
+
_cset(:deploy_release) { File.join(releases_path, deploy_release_name) }
|
153
158
|
|
154
159
|
# =========================================================================
|
155
160
|
# deploy:lock defaults
|
@@ -355,7 +360,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
355
360
|
files = (ENV["FILES"] || "").split(",").map { |f| Dir[f.strip] }.flatten
|
356
361
|
abort "Please specify at least one file or directory to update (via the FILES environment variable)" if files.empty?
|
357
362
|
|
358
|
-
files.each { |file| top.upload(file, File.join(
|
363
|
+
files.each { |file| top.upload(file, File.join(deploy_path, file)) }
|
359
364
|
end
|
360
365
|
|
361
366
|
desc <<-DESC
|
@@ -387,21 +392,16 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
387
392
|
Apply microwave tvdinners to a release directory.
|
388
393
|
DESC
|
389
394
|
task :cook, :roles => :app, :except => { :no_release => true } do
|
390
|
-
run_script = <<-SCRIPT
|
391
|
-
set -e; cd #{current_release};
|
392
|
-
if [[ -x bin/nuke ]]; then #{ruby_loader} bin/nuke; fi;
|
393
|
-
SCRIPT
|
394
|
-
|
395
|
-
run run_script.gsub(/[\n\r]+[ \t]+/, " ")
|
396
395
|
end
|
397
396
|
|
398
397
|
desc <<-DESC
|
399
398
|
Compares your application.
|
400
399
|
DESC
|
401
400
|
task :compare, :roles => :app, :except => { :no_release => true } do
|
402
|
-
set :
|
401
|
+
set :deploy_dir, "compare"
|
402
|
+
set :deploy_release_name, "compare"
|
403
403
|
update_code
|
404
|
-
run "ln -vnfs #{
|
404
|
+
run "ln -vnfs #{deploy_release} #{deploy_path}"
|
405
405
|
end
|
406
406
|
|
407
407
|
namespace :rollback do
|
@@ -456,21 +456,10 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
456
456
|
Override in deploy recipes. Formerly a railsy rake db:migrate.
|
457
457
|
DESC
|
458
458
|
task :migrate, :roles => :db, :only => { :primary => true } do
|
459
|
-
|
460
|
-
|
461
|
-
desc <<-DESC
|
462
|
-
Deploy and run pending migrations. This will work similarly to the \
|
463
|
-
`deploy' task, but will also run any pending migrations (via the \
|
464
|
-
`deploy:migrate' task) prior to updating the symlink. Note that the \
|
465
|
-
update in this case it is not atomic, and transactions are not used, \
|
466
|
-
because migrations are not guaranteed to be reversible.
|
467
|
-
DESC
|
468
|
-
task :migrations do
|
469
|
-
set :migrate_target, :latest
|
459
|
+
set :deploy_dir, "migrate"
|
460
|
+
set :deploy_release_name, "migrate"
|
470
461
|
update_code
|
471
|
-
|
472
|
-
symlink
|
473
|
-
restart
|
462
|
+
run "ln -vnfs #{deploy_release} #{deploy_path}"
|
474
463
|
end
|
475
464
|
|
476
465
|
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:
|
4
|
+
hash: 299
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 154
|
10
|
+
version: 0.0.154
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|