commit
2a57537868
2 changed files with 20 additions and 3 deletions
|
|
@ -1 +1 @@
|
||||||
1.0.0+build.1
|
1.0.0+build.5
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
import zipfile
|
||||||
|
|
||||||
import versioning
|
import versioning
|
||||||
|
|
||||||
ZIP_FILE_NAME = "blender_bake-id-mask_{version}"
|
ZIP_FILE_NAME = "blender_bake-id-mask_{version}.zip"
|
||||||
|
PROJECT_NAME = "Bake ID Mask"
|
||||||
|
|
||||||
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
|
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
|
@ -20,4 +22,19 @@ if __name__ == "__main__":
|
||||||
versioning.save_version(nextVersion)
|
versioning.save_version(nextVersion)
|
||||||
|
|
||||||
filename = os.path.join(TARGET_PATH, ZIP_FILE_NAME.format(version=nextVersion.__str__()))
|
filename = os.path.join(TARGET_PATH, ZIP_FILE_NAME.format(version=nextVersion.__str__()))
|
||||||
shutil.make_archive(filename, 'zip', SOURCE_PATH)
|
with zipfile.ZipFile(filename, 'w', zipfile.ZIP_DEFLATED) as zip:
|
||||||
|
for (root, dirs, files) in os.walk(SOURCE_PATH):
|
||||||
|
if '__pycache__' in dirs:
|
||||||
|
dirs.remove('__pycache__')
|
||||||
|
|
||||||
|
for file in files:
|
||||||
|
|
||||||
|
relativePath = os.path.relpath(
|
||||||
|
os.path.join(root, file),
|
||||||
|
SOURCE_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
zip.write(
|
||||||
|
os.path.join(root, file),
|
||||||
|
os.path.join(PROJECT_NAME, relativePath)
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue