ey-deploy 0.8.2 → 0.9.1

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.
File without changes
@@ -32,8 +32,6 @@ module EY
32
32
  disable_maintenance_page
33
33
 
34
34
  cleanup_old_releases
35
-
36
- info "~> Finalizing deploy"
37
35
  rescue Exception
38
36
  puts_deploy_failure
39
37
  raise
@@ -108,7 +106,7 @@ module EY
108
106
  when "nginx_mongrel"
109
107
  sudo("monit restart all -g #{c.app}")
110
108
  when "nginx_passenger"
111
- sudo("touch #{c.latest_release}/tmp/restart.txt")
109
+ sudo("touch #{c.current_path}/tmp/restart.txt")
112
110
  else
113
111
  raise "Unknown stack #{c.stack}; restart failed!"
114
112
  end
@@ -118,9 +116,9 @@ module EY
118
116
 
119
117
  # task
120
118
  def bundle
121
- if File.exist?("#{c.latest_release}/Gemfile")
119
+ if File.exist?("#{c.release_path}/Gemfile")
122
120
  info "~> Gemfile detected, bundling gems"
123
- lockfile = File.join(c.latest_release, "Gemfile.lock")
121
+ lockfile = File.join(c.release_path, "Gemfile.lock")
124
122
 
125
123
  bundler_version = if File.exist?(lockfile)
126
124
  get_bundler_version(lockfile)
@@ -131,7 +129,7 @@ module EY
131
129
 
132
130
  sudo "#{$0} _#{VERSION}_ install_bundler #{bundler_version}"
133
131
 
134
- run "cd #{c.latest_release} && bundle _#{bundler_version}_ install --without=development --without=test"
132
+ run "cd #{c.release_path} && bundle _#{bundler_version}_ install --without=development --without=test"
135
133
  end
136
134
  end
137
135
 
@@ -152,7 +150,7 @@ module EY
152
150
  info "~> Rolling back to previous release: #{short_log_message(revision)}"
153
151
 
154
152
  run_with_callbacks(:symlink, c.previous_release)
155
- cleanup_latest_release
153
+ cleanup_current_release
156
154
  bundle
157
155
  info "~> Restarting with previous release"
158
156
  with_maintenance_page { run_with_callbacks(:restart) }
@@ -167,7 +165,7 @@ module EY
167
165
  return unless c.migrate?
168
166
  @migrations_reached = true
169
167
  roles :app_master, :solo do
170
- cmd = "cd #{c.latest_release} && #{c.framework_envs} #{c.migration_command}"
168
+ cmd = "cd #{c.release_path} && #{c.framework_envs} #{c.migration_command}"
171
169
  info "~> Migrating: #{cmd}"
172
170
  run(cmd)
173
171
  end
@@ -182,7 +180,7 @@ module EY
182
180
  sudo("chown -R #{c.user}:#{c.group} #{c.deploy_to}")
183
181
  end
184
182
 
185
- def symlink_configs(release_to_link=c.latest_release)
183
+ def symlink_configs(release_to_link=c.release_path)
186
184
  info "~> Symlinking configs"
187
185
  [ "chmod -R g+w #{release_to_link}",
188
186
  "rm -rf #{release_to_link}/log #{release_to_link}/public/system #{release_to_link}/tmp/pids",
@@ -203,7 +201,7 @@ module EY
203
201
  end
204
202
 
205
203
  # task
206
- def symlink(release_to_link=c.latest_release)
204
+ def symlink(release_to_link=c.release_path)
207
205
  info "~> Symlinking code"
208
206
  sudo "rm -f #{c.current_path} && ln -nfs #{release_to_link} #{c.current_path} && chown -R #{c.user}:#{c.group} #{c.current_path}"
209
207
  @symlink_changed = true
@@ -215,9 +213,9 @@ module EY
215
213
 
216
214
  def callback(what)
217
215
  @callbacks_reached ||= true
218
- if File.exist?("#{c.latest_release}/deploy/#{what}.rb")
219
- eysd_path = $0 # invoke others just like we were invoked
220
- run "#{eysd_path} _#{VERSION}_ hook '#{what}' --app '#{config.app}' --release-path #{config.release_path}" do |server, cmd|
216
+ if File.exist?("#{c.release_path}/deploy/#{what}.rb")
217
+ eydeploy_path = $0 # invoke others just like we were invoked
218
+ run "#{eydeploy_path} _#{VERSION}_ hook '#{what}' --app '#{config.app}' --release-path #{config.release_path}" do |server, cmd|
221
219
  cmd << " --framework-env '#{c.environment}'"
222
220
  cmd << " --current-role '#{server.role}'"
223
221
  cmd << " --current-name '#{server.name}'" if server.name
@@ -255,12 +253,12 @@ module EY
255
253
  def with_failed_release_cleanup
256
254
  yield
257
255
  rescue Exception
258
- cleanup_latest_release
256
+ cleanup_current_release
259
257
  raise
260
258
  end
261
259
 
262
- def cleanup_latest_release
263
- sudo "rm -rf #{c.latest_release}"
260
+ def cleanup_current_release
261
+ sudo "rm -rf #{c.release_path}"
264
262
  end
265
263
 
266
264
  def safe_yaml_load(loadable)
@@ -9,9 +9,9 @@ module EY
9
9
  end
10
10
 
11
11
  def run(hook)
12
- hook_path = "#{c.latest_release}/deploy/#{hook}.rb"
12
+ hook_path = "#{c.release_path}/deploy/#{hook}.rb"
13
13
  if File.exist?(hook_path)
14
- Dir.chdir(c.latest_release) do
14
+ Dir.chdir(c.release_path) do
15
15
  puts "~> running deploy hook: deploy/#{hook}.rb"
16
16
  if desc = syntax_error(hook_path)
17
17
  hook_name = File.basename(hook_path)
@@ -1,3 +1,3 @@
1
1
  module EY
2
- VERSION = '0.8.2'
2
+ VERSION = '0.9.1'
3
3
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 8
8
- - 2
9
- version: 0.8.2
7
+ - 9
8
+ - 1
9
+ version: 0.9.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - EY Cloud Team
@@ -14,8 +14,8 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-30 00:00:00 -07:00
18
- default_executable: eysd
17
+ date: 2010-07-13 00:00:00 -07:00
18
+ default_executable: ey-deploy
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false
@@ -58,13 +58,13 @@ dependencies:
58
58
  description:
59
59
  email: cloud@engineyard.com
60
60
  executables:
61
- - eysd
61
+ - ey-deploy
62
62
  extensions: []
63
63
 
64
64
  extra_rdoc_files: []
65
65
 
66
66
  files:
67
- - bin/eysd
67
+ - bin/ey-deploy
68
68
  - lib/ey-deploy/cli.rb
69
69
  - lib/ey-deploy/configuration.rb
70
70
  - lib/ey-deploy/default_maintenance_page.html