Skip to content

Commit

Permalink
Build script automatically creates a zip archive
Browse files Browse the repository at this point in the history
(Up to now this was a manual step)
  • Loading branch information
pineapplemachine committed Aug 25, 2018
1 parent 13887ea commit a31d294
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions release/build_release.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import shutil
import zipfile

version = "v1.2"

Expand All @@ -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.")

0 comments on commit a31d294

Please sign in to comment.