Skip to content

Commit

Permalink
Add support for preserving on diff
Browse files Browse the repository at this point in the history
  • Loading branch information
ps-jay committed Mar 24, 2020
1 parent c2e75cd commit 687e028
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/stackup
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ Clamp do
:attribute_name => :template_source,
&Stackup::Source.method(:new)

option ["-P", "--preserve-template-formatting"], :flag,
"do not normalise the templates when performing the diff"

include HasParameters

option "--tags", "FILE", "stack tags file",
Expand All @@ -387,6 +390,10 @@ Clamp do
if template_source
current["Template"] = stack.template
planned["Template"] = template_source.data
if preserve_template_formatting?
current["Template"] = stack.template_body
planned["Template"] = template_source.body
end
end
unless parameter_sources.empty?
current["Parameters"] = existing_parameters.sort.to_h
Expand Down

0 comments on commit 687e028

Please sign in to comment.