mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 23:24:50 +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 datetime
|
||||||
import random
|
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
|
|
||||||
with open("pyrogram/__init__.py", "r") as f:
|
with open("pyrogram/__init__.py", "r") as f:
|
||||||
pyro_version = re.findall(r"__version__ = \"(.+)\"", f.read())[0]
|
pyro_version = re.findall(r"__version__ = \"(.+)\"", f.read())[0]
|
||||||
date = datetime.datetime.now().strftime("%Y%m%d")
|
date = datetime.datetime.now().strftime("%Y%m%d%H%M")
|
||||||
dev_version = ''.join(random.choice(string.digits) for i in range(4))
|
version = f"{pyro_version}.dev{date}"
|
||||||
version = f"{pyro_version}.dev{date}{dev_version}"
|
|
||||||
|
|
||||||
with open("pyrogram/__init__.py", "r") as f:
|
with open("pyrogram/__init__.py", "r") as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
|
|
@ -24,4 +22,5 @@ with open("setup.py", "r") as f:
|
||||||
with open("setup.py", "w") as f:
|
with open("setup.py", "w") as f:
|
||||||
for line in lines:
|
for line in lines:
|
||||||
line = re.sub(r' name="PyroFork"', ' name="PyroFork-dev"', line)
|
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)
|
f.write(line)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue