engineyard-serverside 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -87,9 +87,9 @@ module EY
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
-
def run_with_callbacks(task
|
90
|
+
def run_with_callbacks(task)
|
91
91
|
callback(:"before_#{task}")
|
92
|
-
send(task
|
92
|
+
send(task)
|
93
93
|
callback(:"after_#{task}")
|
94
94
|
end
|
95
95
|
|
@@ -153,13 +153,14 @@ module EY
|
|
153
153
|
# task
|
154
154
|
def rollback
|
155
155
|
if c.all_releases.size > 1
|
156
|
-
|
156
|
+
rolled_back_release = c.latest_release
|
157
|
+
c.release_path = c.previous_release(rolled_back_release)
|
157
158
|
|
158
159
|
revision = File.read(File.join(c.release_path, 'REVISION')).strip
|
159
160
|
info "~> Rolling back to previous release: #{short_log_message(revision)}"
|
160
161
|
|
161
|
-
run_with_callbacks(:symlink
|
162
|
-
|
162
|
+
run_with_callbacks(:symlink)
|
163
|
+
sudo "rm -rf #{rolled_back_release}"
|
163
164
|
bundle
|
164
165
|
info "~> Restarting with previous release"
|
165
166
|
with_maintenance_page { run_with_callbacks(:restart) }
|
@@ -273,12 +274,8 @@ module EY
|
|
273
274
|
def with_failed_release_cleanup
|
274
275
|
yield
|
275
276
|
rescue Exception
|
276
|
-
cleanup_current_release
|
277
|
-
raise
|
278
|
-
end
|
279
|
-
|
280
|
-
def cleanup_current_release
|
281
277
|
sudo "rm -rf #{c.release_path}"
|
278
|
+
raise
|
282
279
|
end
|
283
280
|
|
284
281
|
def warn_about_missing_lockfile
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-serverside
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 1
|
10
|
+
version: 1.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- EY Cloud Team
|