alpha_omega 0.0.132 → 0.0.133

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 +20 -18
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.132
1
+ 0.0.133
@@ -64,6 +64,14 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
64
64
  _cset(:real_revision) { source.local.query_revision(revision) { |cmd| with_env("LC_ALL", "C") { run_locally(cmd) } } }
65
65
 
66
66
  _cset(:current_workarea) { capture("readlink #{current_path} || true").strip.split("/")[-1] }
67
+ _cset(:previous_release_path) {
68
+ if releases.length > 0
69
+ w = current_workarea
70
+ releases.index(w) && releases[(releases.index(w)-1)%releases.length]
71
+ else
72
+ ""
73
+ end
74
+ }
67
75
  _cset(:release_name) {
68
76
  if releases.length > 0
69
77
  w = current_workarea
@@ -74,6 +82,14 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
74
82
  ""
75
83
  end
76
84
  }
85
+ _cset(:next_release_path) {
86
+ if releases.length > 0
87
+ w = current_workarea
88
+ releases.index(w) && releases[(releases.index(w)+1)%releases.length]
89
+ else
90
+ ""
91
+ end
92
+ }
77
93
 
78
94
  _cset :releases, [ "alpha", "beta", "omega" ]
79
95
  _cset(:releases_dir) { releases.length > 0 ? "releases" : "" }
@@ -86,23 +102,9 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
86
102
 
87
103
  _cset(:releases_path) { File.join(deploy_to, releases_dir) }
88
104
  _cset(:release_path) { File.join(releases_path, release_name) }
89
- _cset(:previous_path) {
90
- if releases.length > 0
91
- w = current_workarea
92
- releases.index(w) && releases[(releases.index(w)-1)%releases.length] || ""
93
- else
94
- ""
95
- end
96
- }
105
+ _cset(:previous_path) { File.join(deploy_to, previous_dir) }
97
106
  _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
- }
107
+ _cset(:next_path) { File.join(deploy_to, next_dir) }
106
108
  _cset(:service_path) { File.join(deploy_to, service_dir) }
107
109
  _cset(:service_drop) { File.join(deploy_to, ".#{service_dir}.d") }
108
110
  _cset(:log_path) { File.join(deploy_to, log_dir) }
@@ -123,9 +125,9 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
123
125
  # standalone case, or during deployment.
124
126
  #
125
127
  # with persistent releases, the latest release is always the current release
126
- _cset(:previous_release) { previous_path }
128
+ _cset(:previous_release) { previous_release_path }
127
129
  _cset(:current_release) { release_path }
128
- _cset(:next_release) { next_path }
130
+ _cset(:next_release) { next_release_path }
129
131
  _cset(:latest_release) { current_release }
130
132
 
131
133
  # =========================================================================
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: 279
4
+ hash: 277
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 132
10
- version: 0.0.132
9
+ - 133
10
+ version: 0.0.133
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem