Skip to content

Commit 7b71309

Browse files
committed
updated python script.
1 parent a060048 commit 7b71309

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

scripts/copy_spec.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def upload_to_s3(file_path: Path, bucket_name: str, folder_name: str):
4444
sys.exit(1)
4545

4646

47-
def main(bucket_name: str):
48-
repo_path = Path.cmd()
49-
spec_dir = repo_path / "Specification"
47+
def main(bucket_name: str, repo_name: str):
48+
49+
spec_dir = repo_name / "Specification"
5050

51-
repo_name = repo_path.name
51+
print(f"[INFO] Checking for Specification folder at: {spec_dir}")
5252

5353
if not spec_dir.exists():
5454
print("[SKIP] No Specification folder found — skipping all processing.")
@@ -81,10 +81,11 @@ def main(bucket_name: str):
8181

8282
if __name__ == "__main__":
8383
print("Hitting main")
84-
#if len(sys.argv) != 2:
85-
# print("Usage: python copy_spec_to_s3.py <s3_bucket_name>")
86-
# sys.exit(1)
84+
if len(sys.argv) != 3:
85+
print("Usage: python copy_spec_to_s3.py <s3_bucket_name> <repo_name>")
86+
sys.exit(1)
8787

88-
#bucket_name = sys.argv[1]
88+
bucket_name = sys.argv[1]
89+
repo_name = sys.argv[2]
8990

90-
#sys.exit(main(bucket_name))
91+
sys.exit(main(bucket_name))

0 commit comments

Comments
 (0)