Skip to content

Commit b42d781

Browse files
author
ChadKluck
committed
expanded build-scripts/update_template_timestamp.py to include VersionDescription
1 parent c822610 commit b42d781

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

application-infrastructure/build-scripts/update_template_timestamp.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ def update_timestamp(template_path):
1818
content
1919
)
2020

21+
# Update VersionDescription to append timestamp
22+
updated_content = re.sub(
23+
r'(VersionDescription:\s*)"([^"]*?)"',
24+
r'\1"\2 - ' + current_timestamp + '"',
25+
updated_content
26+
)
27+
2128
# Write the updated content back to the file
2229
with open(template_path, 'w') as file:
2330
file.write(updated_content)
2431

2532
print(f"Updated AutoPublishCodeSha256 to {current_timestamp}")
33+
print(f"Updated VersionDescription with timestamp {current_timestamp}")
2634

2735
if __name__ == "__main__":
2836
template_path = sys.argv[1] if len(sys.argv) > 1 else "template.yml"

application-infrastructure/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ Resources:
396396
Type: "AWS::Lambda::Permission"
397397
Properties:
398398
Action: lambda:InvokeFunction
399-
FunctionName: !Ref AppFunction #!Sub "${AppFunction}:live"
399+
FunctionName: !Sub "${AppFunction}:live"
400400
Principal: apigateway.amazonaws.com
401401
SourceArn: !Sub "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${WebApi}/*"
402402

0 commit comments

Comments
 (0)