Skip to content

Commit 91c080d

Browse files
authored
🚑 Fix zip build (#452)
1 parent d41e028 commit 91c080d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/doc_builder/commands/push.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ def push_command_add(args):
6363
)
6464
doc_version_folder = str(doc_version_folder)
6565

66-
zip_file_path_without_ext = create_zip_name(library_name, doc_version_folder, with_ext=False)
66+
zip_file_path = create_zip_name(library_name, doc_version_folder)
6767
# eg create ./transformers/v4.0.zip with '/transformers/v4.0/*' file architecture inside
6868
# Use subprocess.run instead of shutil.make_archive to avoid corrupted files, see https://github.com/huggingface/doc-builder/issues/348
69-
print(f"Running zip command: zip -r {zip_file_path_without_ext}/ {path_docs_built}")
70-
subprocess.run(["zip", "-r", zip_file_path_without_ext + "/", path_docs_built], check=True)
71-
zip_file_path = create_zip_name(library_name, doc_version_folder)
69+
print(f"Running zip command: zip -r {zip_file_path} {path_docs_built}")
70+
subprocess.run(["zip", "-r", zip_file_path, path_docs_built], check=True)
7271

7372
api = HfApi()
7473

0 commit comments

Comments
 (0)