kitchen_hooks 1.7.14 → 1.7.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/kitchen_hooks/helpers.rb +18 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0767338529153daae3c90cfa549ce169b0f07046
|
4
|
+
data.tar.gz: 48e21d056a8cc1930d14603c442aa51b299f59e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac75ccfc01f538d04b1e998c1693a468e974a60e619c1e705b215084099fc861081ed243e07e8be1d6ad6f8f1da25fbca8b167e095b4bcc77bae10aec0fc9052
|
7
|
+
data.tar.gz: f4f3bf51efe89bd2ebc25bdb3276460b76805ad37a18b2ad6c15e8de9d58c1b57fe497d8fadeb818a3f3a2b388b51f83e3e00a7a0f19b018e628ee7f70749045
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.15
|
@@ -113,9 +113,9 @@ module KitchenHooks
|
|
113
113
|
do_update = !File::exist?(berksfile_lock)
|
114
114
|
|
115
115
|
$stdout.puts 'Uploading dependencies'
|
116
|
-
berks_install berksfile
|
117
|
-
berks_update berksfile if do_update
|
118
116
|
knives.peach do |knife|
|
117
|
+
berks_install berksfile, knife
|
118
|
+
# berks_update berksfile, knife if do_update
|
119
119
|
berks_upload berksfile, knife
|
120
120
|
end
|
121
121
|
|
@@ -162,21 +162,26 @@ module KitchenHooks
|
|
162
162
|
verify: false
|
163
163
|
}
|
164
164
|
}
|
165
|
+
$stdout.puts 'Berkshelf config: %s' % JSON::pretty_generate(config)
|
165
166
|
config_path = File.join tmp, "#{SecureRandom.hex}-berkshelf.json"
|
166
167
|
File.open(config_path, 'w') do |f|
|
167
|
-
f.puts JSON::
|
168
|
+
f.puts JSON::generate(config)
|
168
169
|
end
|
169
170
|
return config_path
|
170
171
|
end
|
171
172
|
|
172
173
|
|
173
|
-
def self.berks_update berksfile
|
174
|
+
def self.berks_update berksfile, knife=nil
|
174
175
|
$stdout.puts 'started berks_update berksfile=%s' % berksfile.inspect
|
175
176
|
env_git_dir = ENV.delete 'GIT_DIR'
|
176
177
|
env_git_work_tree = ENV.delete 'GIT_WORK_TREE'
|
177
178
|
|
178
|
-
|
179
|
-
Shellwords::escape(
|
179
|
+
knife_args = if knife
|
180
|
+
'--config %s' % Shellwords::escape(berkshelf_config knife)
|
181
|
+
end
|
182
|
+
|
183
|
+
cmd = "berks update --debug --berksfile %s %s" % [
|
184
|
+
Shellwords::escape(berksfile), knife_args
|
180
185
|
]
|
181
186
|
begin
|
182
187
|
$stdout.puts "berks_update: %s" % cmd
|
@@ -194,13 +199,17 @@ module KitchenHooks
|
|
194
199
|
end
|
195
200
|
|
196
201
|
|
197
|
-
def self.berks_install berksfile
|
202
|
+
def self.berks_install berksfile, knife=nil
|
198
203
|
$stdout.puts 'started berks_install berksfile=%s' % berksfile.inspect
|
199
204
|
env_git_dir = ENV.delete 'GIT_DIR'
|
200
205
|
env_git_work_tree = ENV.delete 'GIT_WORK_TREE'
|
201
206
|
|
202
|
-
|
203
|
-
Shellwords::escape(
|
207
|
+
knife_args = if knife
|
208
|
+
'--config %s' % Shellwords::escape(berkshelf_config knife)
|
209
|
+
end
|
210
|
+
|
211
|
+
cmd = "berks install --debug --berksfile %s %s" % [
|
212
|
+
Shellwords::escape(berksfile), knife_args
|
204
213
|
]
|
205
214
|
begin
|
206
215
|
$stdout.puts "berks_install: %s" % cmd
|