Skip to content

Commit 9b5232e

Browse files
committed
copied the spec to new json.
1 parent 9f873f3 commit 9b5232e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

scripts/copy_spec.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +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-
new_json_name = "spec.json"
29-
28+
dst_json_file = root_dir / "spec.json"
29+
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-
json_file.rename(new_json_name)
37-
38-
print(new_json_name)
39-
print(json_file)
36+
dst_json_file.write_bytes(json_file.read_bytes())
4037

41-
upload_to_s3(new_json_name, bucket_name, repo_name)
38+
print(dst_json_file)
39+
40+
upload_to_s3(dst_json_file, bucket_name, repo_name)
4241

4342
print("[DONE] Processing complete.")
4443
return 0

0 commit comments

Comments
 (0)