mirror of
https://github.com/noDRM/DeDRM_tools
synced 2024-11-16 19:48:10 +01:00
Allow packaging without version number
This commit is contained in:
parent
e9a6e80e5a
commit
ca6ec8f6d0
2 changed files with 7 additions and 3 deletions
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
|
@ -10,10 +10,11 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Package
|
- name: Package
|
||||||
run: python3 make_release.py 10.0.1
|
run: python3 make_release.py
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: plugin
|
name: plugin
|
||||||
path: |
|
path: |
|
||||||
DeDRM_tools_*.zip
|
DeDRM_tools_*.zip
|
||||||
|
DeDRM_tools.zip
|
||||||
|
|
|
@ -34,7 +34,10 @@ def make_release(version):
|
||||||
shutil.copy(OBOK_README, RELEASE_DIR)
|
shutil.copy(OBOK_README, RELEASE_DIR)
|
||||||
shutil.copy("ReadMe_Overview.txt", 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)
|
result = shutil.make_archive(release_name, 'zip', RELEASE_DIR)
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(RELEASE_DIR)
|
shutil.rmtree(RELEASE_DIR)
|
||||||
|
@ -48,6 +51,6 @@ if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
version = sys.argv[1]
|
version = sys.argv[1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise SystemExit('Usage: {} version'.format(__file__))
|
version = None
|
||||||
|
|
||||||
print(make_release(version))
|
print(make_release(version))
|
||||||
|
|
Loading…
Reference in a new issue