alpha_omega 0.0.26 → 0.0.27
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/Gemfile.lock +1 -1
- data/recipes/alpha_omega/deploy.rb +7 -7
- data/recipes/alpha_omega/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -204,12 +204,12 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
204
204
|
|
205
205
|
task :bootstrap_code, :except => { :no_release => true } do
|
206
206
|
if releases.length == 1 # without services and run as root
|
207
|
-
run "[[ -d #{deploy_to} ]] || #{try_sudo} install -v -d -m 0775 -o #{root_user} -g #{root_group} #{deploy_to}"
|
208
|
-
run "#{try_sudo}
|
207
|
+
run "[[ -d #{deploy_to} ]] || #{try_sudo} install -v -d -m 0775 #{try_sudo.empty? ? '' : "-o #{root_user} -g #{root_group}"} #{deploy_to}"
|
208
|
+
run "#{try_sudo} install -v -d -m 0775 #{try_sudo.empty? ? '' : "-o #{user} -g #{group}"} #{releases_path} #{deploy_to}/log"
|
209
209
|
else
|
210
210
|
dirs = [ releases_path, service_path, "#{deploy_to}/log" ]
|
211
211
|
dir_args = dirs.map {|d| d.sub("#{deploy_to}/", "") }.join(' ')
|
212
|
-
run "#{try_sudo} install -v -d -m 0775 -o #{user} -g #{group} #{deploy_to}"
|
212
|
+
run "#{try_sudo} install -v -d -m 0775 #{try_sudo.empty? ? '' : "-o #{user} -g #{group}"} #{deploy_to}"
|
213
213
|
run "cd #{deploy_to} && install -v -d -m 0775 #{dir_args}"
|
214
214
|
end
|
215
215
|
end
|
@@ -238,16 +238,16 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
238
238
|
task :symlink, :except => { :no_release => true } do
|
239
239
|
on_rollback do
|
240
240
|
if previous_release
|
241
|
-
run "ln -
|
241
|
+
run "ln -vsnf #{previous_release} #{current_path}; true"
|
242
242
|
else
|
243
243
|
logger.important "no previous release to rollback to, rollback of symlink skipped"
|
244
244
|
end
|
245
245
|
end
|
246
246
|
|
247
247
|
if releases.length == 1
|
248
|
-
run "[[ $(readlink #{current_path} 2>&-) = #{latest_release} ]] || #{try_sudo} ln -
|
248
|
+
run "[[ $(readlink #{current_path} 2>&-) = #{latest_release} ]] || #{try_sudo} ln -vsnf #{latest_release} #{current_path}"
|
249
249
|
else
|
250
|
-
run "ln -
|
250
|
+
run "ln -vsnf #{latest_release} #{current_path}"
|
251
251
|
end
|
252
252
|
|
253
253
|
system "figlet -w 200 #{release_name} activated"
|
@@ -300,7 +300,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
300
300
|
task :revision, :except => { :no_release => true } do
|
301
301
|
if previous_release
|
302
302
|
system "figlet -w 200 on #{previous_release}"
|
303
|
-
run "ln -
|
303
|
+
run "ln -vsnf #{previous_release} #{current_path}"
|
304
304
|
else
|
305
305
|
abort "could not rollback the code because there is no prior release"
|
306
306
|
end
|
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: 41
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 27
|
10
|
+
version: 0.0.27
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|