alpha_omega 0.0.152 → 0.0.153
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 +29 -17
- metadata +30 -32
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.153
|
data/lib/alpha_omega/deploy.rb
CHANGED
@@ -47,6 +47,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
47
47
|
_cset :bundler_options, "--deployment --without development:test"
|
48
48
|
_cset :ruby_loader, ""
|
49
49
|
|
50
|
+
_cset(:run_method) { fetch(:use_sudo, true) ? :sudo : :run }
|
51
|
+
|
50
52
|
_cset :current_pod, "default"
|
51
53
|
_cset :last_pod, nil
|
52
54
|
_cset :local_only, ENV['LOCAL_ONLY'] ? true : false
|
@@ -63,7 +65,23 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
63
65
|
_cset(:strategy) { Capistrano::Deploy::Strategy.new(deploy_via, self) }
|
64
66
|
_cset(:real_revision) { source.local.query_revision(revision) { |cmd| with_env("LC_ALL", "C") { run_locally(cmd) } } }
|
65
67
|
|
66
|
-
_cset
|
68
|
+
_cset :releases, [ "alpha", "beta", "omega" ]
|
69
|
+
_cset(:releases_dir) { releases.length > 0 ? "releases" : "" }
|
70
|
+
_cset(:current_workarea) { capture("readlink #{current_path} || true").strip.split("/")[-1] || releases[0] }
|
71
|
+
|
72
|
+
_cset :previous_dir, "previous"
|
73
|
+
_cset :current_dir, "current"
|
74
|
+
_cset :next_dir, "next"
|
75
|
+
_cset :compare_dir, "compare"
|
76
|
+
_cset :migrate_dir, "migrate"
|
77
|
+
|
78
|
+
_cset :service_dir, "service"
|
79
|
+
_cset :log_dir, "log"
|
80
|
+
|
81
|
+
_cset(:service_path) { File.join(deploy_to, service_dir) }
|
82
|
+
_cset(:service_drop) { File.join(deploy_to, ".#{service_dir}.d") }
|
83
|
+
_cset(:log_path) { File.join(deploy_to, log_dir) }
|
84
|
+
|
67
85
|
_cset(:rollback_release_name) {
|
68
86
|
if releases.length > 0
|
69
87
|
w = current_workarea
|
@@ -90,7 +108,6 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
90
108
|
""
|
91
109
|
end
|
92
110
|
}
|
93
|
-
_cset (:release_name) { current_release_name } # compact
|
94
111
|
_cset(:next_release_name) {
|
95
112
|
if releases.length > 0
|
96
113
|
w = current_workarea
|
@@ -99,31 +116,23 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
99
116
|
""
|
100
117
|
end
|
101
118
|
}
|
102
|
-
|
103
|
-
_cset :
|
104
|
-
_cset(:releases_dir) { releases.length > 0 ? "releases" : "" }
|
105
|
-
_cset :previous_dir, "previous"
|
106
|
-
_cset :current_dir, "current"
|
107
|
-
_cset :next_dir, "next"
|
108
|
-
_cset :service_dir, "service"
|
109
|
-
_cset :log_dir, "log"
|
110
|
-
|
119
|
+
_cset :compare_release_name, compare_dir
|
120
|
+
_cset :migrate_release_name, migrate_dir
|
111
121
|
|
112
122
|
_cset(:releases_path) { File.join(deploy_to, releases_dir) }
|
113
123
|
_cset(:previous_path) { File.join(deploy_to, previous_dir) }
|
114
124
|
_cset(:current_path) { File.join(deploy_to, current_dir) }
|
115
125
|
_cset(:external_path) { current_path }
|
116
126
|
_cset(:next_path) { File.join(deploy_to, next_dir) }
|
117
|
-
_cset(:
|
118
|
-
_cset(:
|
119
|
-
_cset(:log_path) { File.join(deploy_to, log_dir) }
|
127
|
+
_cset(:compare_path) { File.join(deploy_to, compare_dir) }
|
128
|
+
_cset(:migrate_path) { File.join(deploy_to, migrate_dir) }
|
120
129
|
|
121
130
|
_cset(:rollback_revision) { capture("cat #{rollback_release}/REVISION", :except => { :no_release => true }).strip }
|
122
131
|
_cset(:previous_revision) { capture("cat #{previous_release}/REVISION", :except => { :no_release => true }).strip }
|
123
132
|
_cset(:current_revision) { capture("cat #{current_release}/REVISION", :except => { :no_release => true }).strip }
|
124
133
|
_cset(:next_revision) { capture("cat #{next_release}/REVISION", :except => { :no_release => true }).strip }
|
125
|
-
|
126
|
-
_cset(:
|
134
|
+
_cset(:compare_revision) { capture("cat #{compare_release}/REVISION", :except => { :no_release => true }).strip }
|
135
|
+
_cset(:migrate_revision) { capture("cat #{migrate_release}/REVISION", :except => { :no_release => true }).strip }
|
127
136
|
|
128
137
|
# formerly:
|
129
138
|
#
|
@@ -139,6 +148,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
139
148
|
_cset(:previous_release) { File.join(releases_path, previous_release_name) }
|
140
149
|
_cset(:current_release) { File.join(releases_path, current_release_name) }
|
141
150
|
_cset(:next_release) { File.join(releases_path, next_release_name) }
|
151
|
+
_cset(:compare_release) { File.join(releases_path, compare_release_name) }
|
152
|
+
_cset(:migrate_release) { File.join(releases_path, migrate_release_name) }
|
142
153
|
|
143
154
|
# =========================================================================
|
144
155
|
# deploy:lock defaults
|
@@ -388,7 +399,9 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
388
399
|
Compares your application.
|
389
400
|
DESC
|
390
401
|
task :compare, :roles => :app, :except => { :no_release => true } do
|
402
|
+
set :current_release_name, "compare"
|
391
403
|
update_code
|
404
|
+
run "ln -vnfs #{compare_release} #{compare_path}"
|
392
405
|
end
|
393
406
|
|
394
407
|
namespace :rollback do
|
@@ -615,4 +628,3 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
615
628
|
end
|
616
629
|
|
617
630
|
end # Capistrano::Configuration
|
618
|
-
|
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: 301
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 153
|
10
|
+
version: 0.0.153
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|
@@ -16,8 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-08-31 00:00:00
|
20
|
-
default_executable:
|
19
|
+
date: 2011-08-31 00:00:00 Z
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
22
|
name: grit
|
@@ -119,44 +118,43 @@ files:
|
|
119
118
|
- LICENSE
|
120
119
|
- VERSION
|
121
120
|
- README.mkd
|
122
|
-
- libexec/unlock
|
123
|
-
- libexec/proxy
|
124
|
-
- libexec/build
|
125
|
-
- libexec/restart
|
126
|
-
- libexec/stage
|
127
121
|
- libexec/activate
|
128
|
-
- libexec/
|
129
|
-
- libexec/plan
|
130
|
-
- libexec/compare
|
131
|
-
- libexec/shell
|
132
|
-
- libexec/migrate
|
133
|
-
- libexec/deploy
|
134
|
-
- libexec/config
|
122
|
+
- libexec/build
|
135
123
|
- libexec/bump
|
136
|
-
- libexec/dna
|
137
124
|
- libexec/check
|
125
|
+
- libexec/compare
|
126
|
+
- libexec/config
|
138
127
|
- libexec/debug
|
139
|
-
- libexec/
|
140
|
-
- libexec/
|
128
|
+
- libexec/deploy
|
129
|
+
- libexec/dist
|
130
|
+
- libexec/dna
|
141
131
|
- libexec/hosts
|
132
|
+
- libexec/invoke
|
133
|
+
- libexec/lock
|
134
|
+
- libexec/migrate
|
135
|
+
- libexec/plan
|
136
|
+
- libexec/proxy
|
142
137
|
- libexec/release
|
143
|
-
- libexec/
|
144
|
-
-
|
145
|
-
-
|
146
|
-
-
|
138
|
+
- libexec/restart
|
139
|
+
- libexec/rollback
|
140
|
+
- libexec/shell
|
141
|
+
- libexec/stage
|
142
|
+
- libexec/unlock
|
143
|
+
- lib/alpha_omega/deploy/dependencies.rb
|
147
144
|
- lib/alpha_omega/deploy/local_dependency.rb
|
145
|
+
- lib/alpha_omega/deploy/remote_dependency.rb
|
146
|
+
- lib/alpha_omega/deploy/scm/base.rb
|
147
|
+
- lib/alpha_omega/deploy/scm/git.rb
|
148
|
+
- lib/alpha_omega/deploy/scm.rb
|
148
149
|
- lib/alpha_omega/deploy/strategy/base.rb
|
149
150
|
- lib/alpha_omega/deploy/strategy/checkout.rb
|
150
151
|
- lib/alpha_omega/deploy/strategy/remote.rb
|
151
|
-
- lib/alpha_omega/deploy/scm.rb
|
152
|
-
- lib/alpha_omega/deploy/templates/maintenance.rhtml
|
153
152
|
- lib/alpha_omega/deploy/strategy.rb
|
154
|
-
- lib/alpha_omega/deploy/
|
155
|
-
- lib/alpha_omega/deploy
|
156
|
-
- lib/alpha_omega/
|
157
|
-
- lib/alpha_omega/
|
153
|
+
- lib/alpha_omega/deploy/templates/maintenance.rhtml
|
154
|
+
- lib/alpha_omega/deploy.rb
|
155
|
+
- lib/alpha_omega/utils.rb
|
156
|
+
- lib/alpha_omega/version.rb
|
158
157
|
- bin/alpha_omega
|
159
|
-
has_rdoc: true
|
160
158
|
homepage: https://github.com/HeSYINUvSBZfxqA/alpha_omega
|
161
159
|
licenses: []
|
162
160
|
|
@@ -186,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
184
|
requirements: []
|
187
185
|
|
188
186
|
rubyforge_project:
|
189
|
-
rubygems_version: 1.
|
187
|
+
rubygems_version: 1.8.21
|
190
188
|
signing_key:
|
191
189
|
specification_version: 3
|
192
190
|
summary: alpha_omega capistrano recipes
|