mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 02:30:44 -06:00
build: fix release regex
This commit is contained in:
parent
ac02151a51
commit
3fe4110e06
1 changed files with 4 additions and 1 deletions
|
@ -46,11 +46,14 @@ def release():
|
||||||
next = f"{datetime.now().year}.{inc_build(build)}"
|
next = f"{datetime.now().year}.{inc_build(build)}"
|
||||||
msg = f"bump {current} -> {next}"
|
msg = f"bump {current} -> {next}"
|
||||||
FILE.write_text(
|
FILE.write_text(
|
||||||
re.sub(r'__version__ = "[\d\.]+"', f'__version__ = "{next}"', FILE.read_text())
|
re.sub(r'__version__ = ".*"', f'__version__ = "{next}"', FILE.read_text())
|
||||||
)
|
)
|
||||||
subprocess.run(["git", "add", FILE])
|
subprocess.run(["git", "add", FILE])
|
||||||
subprocess.run(["git", "commit", "-m", msg, "--no-verify"])
|
subprocess.run(["git", "commit", "-m", msg, "--no-verify"])
|
||||||
subprocess.run(["git", "tag", f"v{next}"])
|
subprocess.run(["git", "tag", f"v{next}"])
|
||||||
|
FILE.write_text(
|
||||||
|
re.sub(r'__version__ = ".*"', f'__version__ = "{next}-dev"', FILE.read_text())
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue