Skip to content

Commit 5f80267

Browse files
committed
updated script to rename the file.
1 parent 491fb38 commit 5f80267

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

scripts/copy_spec.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,19 @@ def main(bucket_name: str, repo_name: str):
2525

2626
root_dir = Path.cwd().parents[1]
2727
json_file = root_dir / f"{repo_name}.json"
28-
minified_json = "spec.json"
28+
new_json_name = "spec.json"
2929

3030
print(json_file)
3131

3232
if not json_file.is_file():
3333
print(f"[ERROR] JSON spec not found: {json_file}")
3434
return 1
3535

36-
with open(json_file, "r") as f:
37-
data = json.load(f)
36+
json_file.rename(new_json_name)
3837

39-
with open(minified_json, "w") as f:
40-
json.dump(data, f)
41-
42-
upload_to_s3(minified_json, bucket_name, repo_name)
38+
print(json_file)
39+
40+
upload_to_s3(json_file, bucket_name, repo_name)
4341

4442
print("[DONE] Processing complete.")
4543
return 0

0 commit comments

Comments
 (0)