mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
PyroFork: Update dev versioning
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
24d933b7c1
commit
e2afef240d
1 changed files with 3 additions and 4 deletions
7
.github/utils/randomize.py
vendored
7
.github/utils/randomize.py
vendored
|
|
@ -1,13 +1,11 @@
|
|||
import datetime
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
|
||||
with open("pyrogram/__init__.py", "r") as f:
|
||||
pyro_version = re.findall(r"__version__ = \"(.+)\"", f.read())[0]
|
||||
date = datetime.datetime.now().strftime("%Y%m%d")
|
||||
dev_version = ''.join(random.choice(string.digits) for i in range(4))
|
||||
version = f"{pyro_version}.dev{date}{dev_version}"
|
||||
date = datetime.datetime.now().strftime("%Y%m%d%H%M")
|
||||
version = f"{pyro_version}.dev{date}"
|
||||
|
||||
with open("pyrogram/__init__.py", "r") as f:
|
||||
lines = f.readlines()
|
||||
|
|
@ -24,4 +22,5 @@ with open("setup.py", "r") as f:
|
|||
with open("setup.py", "w") as f:
|
||||
for line in lines:
|
||||
line = re.sub(r' name="PyroFork"', ' name="PyroFork-dev"', line)
|
||||
line = re.sub(r' "Development Status :: 5 - Production/Stable"', ' "Development Status :: 4 - Beta"', line)
|
||||
f.write(line)
|
||||
|
|
|
|||
Loading…
Reference in a new issue