From ca6ec8f6d0e43e8abed5bc9c293160e0e9eb58bb Mon Sep 17 00:00:00 2001 From: NoDRM Date: Mon, 29 Nov 2021 16:27:51 +0100 Subject: [PATCH] Allow packaging without version number --- .github/workflows/main.yml | 3 ++- make_release.py | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9f3ab7..899539a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/make_release.py b/make_release.py index 0e95173..e600af8 100755 --- a/make_release.py +++ b/make_release.py @@ -34,7 +34,10 @@ def make_release(version): shutil.copy(OBOK_README, RELEASE_DIR) shutil.copy("ReadMe_Overview.txt", RELEASE_DIR) - release_name = 'DeDRM_tools_{}'.format(version) + 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))