vlad 2.5.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +10 -0
- data/lib/vlad.rb +2 -2
- data/lib/vlad/core.rb +39 -17
- metadata +5 -5
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
=== 2.6.0 / 2013-07-03
|
2
|
+
|
3
|
+
* 1 minor enhancement:
|
4
|
+
|
5
|
+
* Split update task into smaller chunks for easier extension. (chredd)
|
6
|
+
|
7
|
+
* 1 bug fix:
|
8
|
+
|
9
|
+
* Oops. Fixed typo in exception class name. (dplummer)
|
10
|
+
|
1
11
|
=== 2.5.1 / 2013-06-20
|
2
12
|
|
3
13
|
* 2 minor enhancements:
|
data/lib/vlad.rb
CHANGED
@@ -21,7 +21,7 @@ module Vlad
|
|
21
21
|
|
22
22
|
##
|
23
23
|
# This is the version of Vlad you are running.
|
24
|
-
VERSION = "2.
|
24
|
+
VERSION = "2.6.0"
|
25
25
|
|
26
26
|
##
|
27
27
|
# Loads tasks file +tasks_file+ and various recipe styles as a hash
|
@@ -62,7 +62,7 @@ module Vlad
|
|
62
62
|
begin
|
63
63
|
require "vlad/#{recipe}"
|
64
64
|
rescue LoadError => e
|
65
|
-
re =
|
65
|
+
re = RuntimeError.new e.message
|
66
66
|
re.backtrace = e.backtrace
|
67
67
|
raise re
|
68
68
|
end
|
data/lib/vlad/core.rb
CHANGED
@@ -64,7 +64,15 @@ namespace :vlad do
|
|
64
64
|
the update.".cleanup
|
65
65
|
|
66
66
|
remote_task :update, :roles => :app do
|
67
|
-
|
67
|
+
Rake::Task['vlad:update_app'].invoke
|
68
|
+
Rake::Task['vlad:update_symlinks'].invoke
|
69
|
+
Rake::Task['vlad:log_revision'].invoke
|
70
|
+
end
|
71
|
+
|
72
|
+
desc "Updates your application server to the latest revision. Syncs
|
73
|
+
a copy of the repository, exports it as the latest release".cleanup
|
74
|
+
|
75
|
+
remote_task :update_app, :roles => :app do
|
68
76
|
begin
|
69
77
|
commands = []
|
70
78
|
commands << "umask #{umask}" if umask
|
@@ -88,16 +96,41 @@ namespace :vlad do
|
|
88
96
|
commands << "chgrp -R #{perm_group} #{latest_release}" if perm_group
|
89
97
|
|
90
98
|
run commands.join(" && ")
|
91
|
-
|
99
|
+
rescue => e
|
100
|
+
run "rm -rf #{release_path}"
|
101
|
+
raise e
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
desc "Updates up your symlinks, sets the latest revision to current and updates symlink for shared path".cleanup
|
92
106
|
|
93
|
-
|
107
|
+
remote_task :update_symlinks, :roles => :app do
|
108
|
+
begin
|
109
|
+
ops = []
|
110
|
+
unless shared_paths.empty?
|
111
|
+
ops = shared_paths.each do |sp, rp|
|
112
|
+
ops << "ln -s #{shared_path}/#{sp} #{latest_release}/#{rp}"
|
113
|
+
end
|
114
|
+
end
|
115
|
+
ops << "rm -f #{current_path}"
|
116
|
+
ops << "ln -s #{latest_release} #{current_path}"
|
117
|
+
run ops.join(' && ') unless ops.empty?
|
118
|
+
rescue => e
|
119
|
+
run "rm -f #{current_path} && ln -s #{previous_release} #{current_path}"
|
120
|
+
run "rm -rf #{release_path}"
|
121
|
+
raise e
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
desc "Log the update".cleanup
|
126
|
+
|
127
|
+
remote_task :log_revision, :roles => :app do
|
128
|
+
begin
|
94
129
|
commands = []
|
95
130
|
|
96
131
|
commands << "umask #{umask}" if umask
|
97
132
|
|
98
133
|
commands += [
|
99
|
-
"rm -f #{current_path}",
|
100
|
-
"ln -s #{latest_release} #{current_path}",
|
101
134
|
"echo #{now} $USER #{revision} #{File.basename(release_path)} >> #{deploy_to}/revisions.log"
|
102
135
|
]
|
103
136
|
|
@@ -106,23 +139,12 @@ namespace :vlad do
|
|
106
139
|
|
107
140
|
run commands.join(' && ')
|
108
141
|
rescue => e
|
109
|
-
run "rm -f #{current_path} && ln -s #{previous_release} #{current_path}"
|
110
|
-
symlink
|
142
|
+
run "rm -f #{current_path} && ln -s #{previous_release} #{current_path}"
|
111
143
|
run "rm -rf #{release_path}"
|
112
144
|
raise e
|
113
145
|
end
|
114
146
|
end
|
115
147
|
|
116
|
-
desc "Updates the symlinks for shared paths".cleanup
|
117
|
-
|
118
|
-
remote_task :update_symlinks, :roles => :app do
|
119
|
-
unless shared_paths.empty?
|
120
|
-
ops = shared_paths.map do |sp, rp|
|
121
|
-
"ln -s #{shared_path}/#{sp} #{latest_release}/#{rp}"
|
122
|
-
end
|
123
|
-
run ops.join(' && ') unless ops.empty?
|
124
|
-
end
|
125
|
-
end
|
126
148
|
|
127
149
|
desc "Invoke a single command on every remote server. This is useful for
|
128
150
|
performing one-off commands that may not require a full task to be written
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vlad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 2.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 2.6.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
FBHgymkyj/AOSqKRIpXPhjC6
|
39
39
|
-----END CERTIFICATE-----
|
40
40
|
|
41
|
-
date: 2013-
|
41
|
+
date: 2013-07-03 00:00:00 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rake
|
metadata.gz.sig
CHANGED
Binary file
|