Skip to content

Commit 0acd052

Browse files
committed
clean up parameters for script
Signed-off-by: Andy Doan <andy@foundries.io>
1 parent 44cdffe commit 0acd052

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

publish_artifacts.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import requests
1212

1313
gh_token = os.environ["GITHUB_TOKEN"]
14-
num_threads_str = os.environ.get("UPLOAD_THREADS", "5")
1514

1615

1716
def upload_file(args):
@@ -99,13 +98,18 @@ def main(num_threads: int, artifacts_dir: str, base_url: str):
9998

10099

101100
if __name__ == "__main__":
102-
BUILD_DIR = os.environ["BUILD_DIR"]
103-
if BUILD_DIR[-1] != "/":
104-
BUILD_DIR = BUILD_DIR + "/"
101+
build_dir = os.environ["BUILD_DIR"]
102+
if build_dir[-1] != "/":
103+
build_dir = build_dir + "/"
105104

106-
URL = os.environ["URL"]
107-
if URL[-1] != "/":
108-
URL = URL + "/"
105+
file_server = os.environ["FILE_SERVER"]
106+
if file_server[-1] != "/":
107+
file_server = file_server + "/"
109108

109+
build_id = os.environ["BUILD_ID"]
110+
url = f"{file_server}/${build_id}/"
111+
112+
num_threads_str = os.environ.get("UPLOAD_THREADS", "5")
110113
num_threads = int(num_threads_str)
111-
main(num_threads, BUILD_DIR, URL)
114+
115+
main(num_threads, build_dir, url)

0 commit comments

Comments
 (0)