Allow packaging without version number

This commit is contained in:
NoDRM 2021-11-29 16:27:51 +01:00
parent e9a6e80e5a
commit ca6ec8f6d0
2 changed files with 7 additions and 3 deletions

View File

@ -10,10 +10,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Package
run: python3 make_release.py 10.0.1
run: python3 make_release.py
- name: Upload
uses: actions/upload-artifact@v2
with:
name: plugin
path: |
DeDRM_tools_*.zip
DeDRM_tools.zip

View File

@ -34,7 +34,10 @@ def make_release(version):
shutil.copy(OBOK_README, RELEASE_DIR)
shutil.copy("ReadMe_Overview.txt", RELEASE_DIR)
if version is not None:
release_name = 'DeDRM_tools_{}'.format(version)
else:
release_name = 'DeDRM_tools'
result = shutil.make_archive(release_name, 'zip', RELEASE_DIR)
try:
shutil.rmtree(RELEASE_DIR)
@ -48,6 +51,6 @@ if __name__ == '__main__':
try:
version = sys.argv[1]
except IndexError:
raise SystemExit('Usage: {} version'.format(__file__))
version = None
print(make_release(version))