aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorpukkandan <pukkandan@gmail.com>2021-01-29 01:02:37 +0530
committerpukkandan <pukkandan@gmail.com>2021-01-29 01:03:32 +0530
commit66c935fb16c21280dde261f7f48f04c50c462df5 (patch)
tree6cd5b3a972ce096331ffdee118ac80254f280980 /scripts
parent64c0d954e573a608e497c8318b35a81c25583003 (diff)
downloadhypervideo-pre-66c935fb16c21280dde261f7f48f04c50c462df5.tar.lz
hypervideo-pre-66c935fb16c21280dde261f7f48f04c50c462df5.tar.xz
hypervideo-pre-66c935fb16c21280dde261f7f48f04c50c462df5.zip
Linter and misc cleanup
:ci skip dl
Diffstat (limited to 'scripts')
-rw-r--r--scripts/update-version-workflow.py27
-rw-r--r--scripts/update-version.py33
2 files changed, 0 insertions, 60 deletions
diff --git a/scripts/update-version-workflow.py b/scripts/update-version-workflow.py
deleted file mode 100644
index bb3d8c83e..000000000
--- a/scripts/update-version-workflow.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from __future__ import unicode_literals
-from datetime import datetime
-
-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()
diff --git a/scripts/update-version.py b/scripts/update-version.py
deleted file mode 100644
index e1eb53f38..000000000
--- a/scripts/update-version.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# Unused
-
-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')
-
-_OLD_VERSION = _LATEST_VERSION.rsplit("-", 1)
-
-if len(_OLD_VERSION) > 0:
- old_ver = _OLD_VERSION[0]
-
-old_rev = ''
-if len(_OLD_VERSION) > 1:
- old_rev = _OLD_VERSION[1]
-
-now = datetime.now()
-# ver = f'{datetime.today():%Y.%m.%d}'
-ver = now.strftime("%Y.%m.%d")
-rev = ''
-
-if old_ver == ver:
- if old_rev:
- rev = int(old_rev) + 1
- else:
- rev = 1
-
-_SEPARATOR = '-'
-
-version = _SEPARATOR.join(filter(None, [ver, str(rev)]))