We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f873f3 commit 9b5232eCopy full SHA for 9b5232e
scripts/copy_spec.py
@@ -25,20 +25,19 @@ def main(bucket_name: str, repo_name: str):
25
26
root_dir = Path.cwd().parents[1]
27
json_file = root_dir / f"{repo_name}.json"
28
- new_json_name = "spec.json"
29
-
+ dst_json_file = root_dir / "spec.json"
+
30
print(json_file)
31
32
if not json_file.is_file():
33
print(f"[ERROR] JSON spec not found: {json_file}")
34
return 1
35
36
- json_file.rename(new_json_name)
37
38
- print(new_json_name)
39
- print(json_file)
+ dst_json_file.write_bytes(json_file.read_bytes())
40
41
- upload_to_s3(new_json_name, bucket_name, repo_name)
+ print(dst_json_file)
+ upload_to_s3(dst_json_file, bucket_name, repo_name)
42
43
print("[DONE] Processing complete.")
44
return 0
0 commit comments