diff --git a/release/build_release.py b/release/build_release.py index 7f83f08..1c1e97b 100644 --- a/release/build_release.py +++ b/release/build_release.py @@ -1,5 +1,6 @@ import os import shutil +import zipfile version = "v1.2" @@ -16,4 +17,11 @@ shutil.copyfile("../LICENSE", os.path.join(output_dir, "LICENSE")) shutil.copyfile("../readme.md", os.path.join(output_dir, "readme.md")) +print("Compressing...") + +with zipfile.ZipFile(output_dir + ".zip", "w", zipfile.ZIP_DEFLATED) as zfile: + for root, dirs, file_names in os.walk(output_dir): + for file_name in file_names: + zfile.write(os.path.join(root, file_name)) + print("Done.")