diff options
author | pukkandan <pukkandan@gmail.com> | 2021-01-29 23:15:27 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-01-29 23:16:00 +0530 |
commit | e38df8f9fa4d715513453928591346f680dbe298 (patch) | |
tree | 80e8eff25fbb5920b11792d7b3e1dd9199dd857a /devscripts/update-version-workflow.py | |
parent | caa15a7b57e7bec31c5dd2e1a5249110b282aab1 (diff) |
Refactor `update-version`, `pyinst.py` and related files
* Refactor update-version
* Moved pyinst, update-version and icon into devscripts
* pyinst doesn't bump version anymore
* Merge pyinst and pyinst32. Usage: `pyinst.py [32|64]`
* Add mutagen as requirement
* Remove make_win and related files
Diffstat (limited to 'devscripts/update-version-workflow.py')
-rw-r--r-- | devscripts/update-version-workflow.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/devscripts/update-version-workflow.py b/devscripts/update-version-workflow.py deleted file mode 100644 index 4ac130a0d..000000000 --- a/devscripts/update-version-workflow.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import unicode_literals -from datetime import datetime -# import urllib.request - -# response = urllib.request.urlopen('https://blackjack4494.github.io/youtube-dlc/update/LATEST_VERSION') -# _LATEST_VERSION = response.read().decode('utf-8') - -exec(compile(open('youtube_dlc/version.py').read(), 'youtube_dlc/version.py', 'exec')) -_LATEST_VERSION = locals()['__version__'] - -_OLD_VERSION = _LATEST_VERSION.replace('-', '.').split(".", 4) - -old_ver = '.'.join(_OLD_VERSION[:3]) -old_rev = _OLD_VERSION[3] if len(_OLD_VERSION) > 3 else '' - -ver = datetime.now().strftime("%Y.%m.%d") -rev = str(int(old_rev or 0) + 1) if old_ver == ver else '' - -version = '.'.join((ver, rev)) if rev else ver - -print('::set-output name=ytdlc_version::' + version) - -file_version_py = open('youtube_dlc/version.py', 'rt') -data = file_version_py.read() -data = data.replace(_LATEST_VERSION, version) -file_version_py.close() - -file_version_py = open('youtube_dlc/version.py', 'wt') -file_version_py.write(data) -file_version_py.close() |