Skip to content

Commit

Permalink
Patch deployment of template body when template is yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmitrofan committed Nov 5, 2020
1 parent 4c68d91 commit 7a2cd91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.7-alpine

RUN pip install stackuchin==1.5.3
RUN pip install stackuchin==1.5.4

VOLUME /project

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

here = path.abspath(path.dirname(__file__))

current_version = str('1.5.3')
current_version = str('1.5.4')

# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
Expand Down
2 changes: 1 addition & 1 deletion src/stackuchin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self):

# noinspection PyMethodMayBeStatic
def version(self):
print("1.5.3")
print("1.5.4")

# noinspection PyMethodMayBeStatic
def create(self):
Expand Down
4 changes: 1 addition & 3 deletions src/stackuchin/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,9 @@ def upload(stack_file, stack_name, s3_bucket, s3_prefix,
exit(1)

template_string = None
loaded_as_json = False
try:
with open(stacks[stack_name]['Template'], 'r') as template_stream:
template_string = json.load(template_stream)
loaded_as_json = True
except Exception as e:
try:
with open(stacks[stack_name]['Template'], 'r') as template_stream:
Expand All @@ -187,7 +185,7 @@ def upload(stack_file, stack_name, s3_bucket, s3_prefix,

output_object = {
"type": "TemplateBody",
"value": json.dumps(template_string) if loaded_as_json else template_string
"value": json.dumps(template_string)
}

template_key = None
Expand Down

0 comments on commit 7a2cd91

Please sign in to comment.