Skip to content

Commit

Permalink
Expect that artifacts are moved to project root
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslittle230 committed Feb 2, 2023
1 parent 14fc3db commit c2f7593
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions scripts/upload_build_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,15 @@ def invalidate():
print("Error: Environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` must be set in order to upload to AWS S3.")
exit(1)

# Script expects that these files will all be present in
# the ./web-artifacts directory in the project root.
# All filenames in the three lists below are expected to exist in the project root.

web_artifacts = [
{"filename": "stork.js", "contentType": "text/javascript"},
{"filename": "stork.wasm", "contentType": "application/wasm"},
# {"filename": "stork.js.map", "contentType": "binary/octet-stream"},
{"filename": "stork.css", "contentType": "text/css"},
]

# Script expects that for each file below, a corresponding file
# will exist at ./{binary}/stork in the project root.
binaries = [
"stork-macos-11",
"stork-macos-12",
Expand All @@ -79,7 +77,6 @@ def invalidate():
# "stork-amazon-linux",
]

# Script expects that these files will exist in the project root.
other_files = [
"federalist.st",
"3b1b.st",
Expand All @@ -93,7 +90,7 @@ def invalidate():
opj("releases", ref, file["filename"]),
opj("releases", "latest", file["filename"]),
]:
source_path = opj(projroot, "web-artifacts", file["filename"])
source_path = opj(projroot, file["filename"])

uploadFile(source_path, destination_path, {
'ContentType': file["contentType"]})
Expand All @@ -103,7 +100,7 @@ def invalidate():
opj("releases", ref, binary),
opj("releases", "latest", binary),
]:
source_path = opj(projroot, binary, "stork")
source_path = opj(projroot, binary)
uploadFile(source_path, destination_path)

for file in other_files:
Expand Down

0 comments on commit c2f7593

Please sign in to comment.