Skip to content

Commit 0c62813

Browse files
author
Bob Strahan
committed
Fix UI deployment package to exclude .aws-sam directories and .env files
1 parent a1729ed commit 0c62813

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ SPDX-License-Identifier: MIT-0
1515
- Fixed issue where CloudFront policy statements were still appearing in generated GovCloud templates despite CloudFront resources being removed
1616
- Fix duplicate Glue tables are created when using a document class that contains a dash (-). Resolved by replacing dash in section types with underscore character when creating the table, to align with the table name generated later by the Glue crawler - resolves #57.
1717
- Fix occasional UI error 'Failed to get document details - please try again later' - resolves #58
18+
- Fixed UI zipfile creation to exclude .aws-sam directories and .env files from deployment package
1819

1920
## [0.3.15]
2021

publish.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,11 +1143,14 @@ def package_ui(self):
11431143

11441144
with zipfile.ZipFile(zipfile_path, "w", zipfile.ZIP_DEFLATED) as zipf:
11451145
ui_dir = "src/ui"
1146-
exclude_dirs = {"node_modules", "build"}
1146+
exclude_dirs = {"node_modules", "build", ".aws-sam"}
11471147
for root, dirs, files in os.walk(ui_dir):
11481148
# Exclude specified directories from zipping
11491149
dirs[:] = [d for d in dirs if d not in exclude_dirs]
11501150
for file in files:
1151+
# Skip .env files
1152+
if file == ".env" or file.startswith(".env."):
1153+
continue
11511154
file_path = os.path.join(root, file)
11521155
arcname = os.path.relpath(file_path, ui_dir)
11531156
zipf.write(file_path, arcname)

0 commit comments

Comments
 (0)