alpha_omega 0.0.131 → 0.0.132
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.rb +11 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.132
|
data/lib/alpha_omega/deploy.rb
CHANGED
@@ -79,6 +79,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
79
79
|
_cset(:releases_dir) { releases.length > 0 ? "releases" : "" }
|
80
80
|
_cset :previous_dir, "previous"
|
81
81
|
_cset :current_dir, "current"
|
82
|
+
_cset :next_dir, "next"
|
82
83
|
_cset :service_dir, "service"
|
83
84
|
_cset :log_dir, "log"
|
84
85
|
|
@@ -94,12 +95,21 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
94
95
|
end
|
95
96
|
}
|
96
97
|
_cset(:current_path) { File.join(deploy_to, current_dir) }
|
98
|
+
_cset(:next_path) {
|
99
|
+
if releases.length > 0
|
100
|
+
w = current_workarea
|
101
|
+
releases.index(w) && releases[(releases.index(w)+1)%releases.length] || ""
|
102
|
+
else
|
103
|
+
""
|
104
|
+
end
|
105
|
+
}
|
97
106
|
_cset(:service_path) { File.join(deploy_to, service_dir) }
|
98
107
|
_cset(:service_drop) { File.join(deploy_to, ".#{service_dir}.d") }
|
99
108
|
_cset(:log_path) { File.join(deploy_to, log_dir) }
|
100
109
|
|
101
110
|
_cset(:previous_revision) { capture("cat #{previous_release}/REVISION", :except => { :no_release => true }).chomp if previous_release }
|
102
111
|
_cset(:current_revision) { capture("cat #{current_path}/REVISION", :except => { :no_release => true }).chomp }
|
112
|
+
_cset(:next_revision) { capture("cat #{next_release}/REVISION", :except => { :no_release => true }).chomp if next_release }
|
103
113
|
_cset(:latest_revision) { capture("cat #{current_release}/REVISION", :except => { :no_release => true }).chomp }
|
104
114
|
|
105
115
|
_cset(:run_method) { fetch(:use_sudo, true) ? :sudo : :run }
|
@@ -115,6 +125,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
115
125
|
# with persistent releases, the latest release is always the current release
|
116
126
|
_cset(:previous_release) { previous_path }
|
117
127
|
_cset(:current_release) { release_path }
|
128
|
+
_cset(:next_release) { next_path }
|
118
129
|
_cset(:latest_release) { current_release }
|
119
130
|
|
120
131
|
# =========================================================================
|
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: 279
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 132
|
10
|
+
version: 0.0.132
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|