cfnpp 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cfnpp +11 -5
- 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: fc33bf38fe5963d84f59af0c4594ad3dd94134e8
|
4
|
+
data.tar.gz: aa7fbda79bc80f45ffbf8e51c6c271063cecd3f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74d3c94bf5b700c211b4c049391a1d885b828f247dd9814e6a0d9e682f1a931d8e506b44e26a819538a6e7058bfebc5793487c7501fcaf6db209464981e70f55
|
7
|
+
data.tar.gz: 8d474998c20402957de8eae6a8368f3526bf0dc84f1d28ff50b73596a17533a1defc34129c108ba496ad3a6610f3b1f92092fa99a09892e87693fa084a4e5f7d
|
data/bin/cfnpp
CHANGED
@@ -158,14 +158,19 @@ eot
|
|
158
158
|
needs_update = false
|
159
159
|
if action == 'update' && stack.exists?
|
160
160
|
current_revision = stack.parameters['TemplateGitRevision']
|
161
|
+
new_revision = opts['TemplateGitRevision']
|
161
162
|
#puts "Checking current stack git revision (#{current_revision}) against desired revision (#{opts['TemplateGitRevision']})"
|
162
|
-
if current_revision
|
163
|
-
|
163
|
+
if !current_revision.nil? && current_revision.size > 0
|
164
|
+
if !new_revision.nil? && new_revision.size > 0
|
165
|
+
if current_revision != new_revision
|
166
|
+
needs_update = true
|
167
|
+
end
|
168
|
+
end
|
164
169
|
end
|
165
170
|
end
|
166
171
|
|
167
172
|
unless needs_update
|
168
|
-
puts "
|
173
|
+
puts "skipping update for stack (#{stack_name}) because the stack's current revision (#{current_revision}) and new revision (#{new_revision}) don't indicate that an update is necessary"
|
169
174
|
exit
|
170
175
|
end
|
171
176
|
end
|
@@ -375,8 +380,9 @@ def get_template_info()
|
|
375
380
|
|
376
381
|
# Try from ploy package.
|
377
382
|
package = `dpkg -S #{pwd} 2>/dev/null`
|
378
|
-
if package && package =~ /^cloudformation-tools
|
379
|
-
|
383
|
+
if package && package =~ /^cloudformation-tools/
|
384
|
+
package.sub!(/:.*/, '')
|
385
|
+
gitrev = `dpkg-query -W -f='${gitrev}' #{package}`
|
380
386
|
end
|
381
387
|
|
382
388
|
#If stin and stdout or tty then someone is running this from command line.
|