cfnpp 0.3.7 → 0.3.8

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/cfnpp +11 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95a0912d91ace3af90b743ad94befb92ff3a58cf
4
- data.tar.gz: ebef71d68111a3fde3f23127177c415c775cc581
3
+ metadata.gz: fc33bf38fe5963d84f59af0c4594ad3dd94134e8
4
+ data.tar.gz: aa7fbda79bc80f45ffbf8e51c6c271063cecd3f2
5
5
  SHA512:
6
- metadata.gz: f601f55468948a4992025ff6f226407051cd60e6f0d27ca3ad59925751d74e210c35551e92e00834f8a584efe61eb7f28498309c61cd2038b3bc95e80d6dc336
7
- data.tar.gz: 883149010e8ad57f7845207ba7274257cf75ad4debceb14662866cd3bd8dfb931e5cd3d8062effce4ef9bceb4df83b49e30549dbeb1842f96bd84488e5300058
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 != opts['TemplateGitRevision']
163
- needs_update = true
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 "Skipping update for stack (#{stack_name}) because the stack's current revision (#{current_revision}) matches the new revision"
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
- gitrev = `dpkg-query -W -f='${gitrev}' cloudformation-tools`
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfnpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bruce