From 858e2189849a004664965489ca82f9a83cb60168 Mon Sep 17 00:00:00 2001 From: 0xNineteen <0x39015319@gmail.com> Date: Thu, 10 Nov 2022 11:21:26 +0000 Subject: [PATCH] update release script --- new_release.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/new_release.py b/new_release.py index dcdeee45..59f20123 100644 --- a/new_release.py +++ b/new_release.py @@ -2,6 +2,12 @@ import re from subprocess import Popen +with open('pyproject.toml', 'r') as f: + data = f.read() +result = re.search("\nversion = \"(.*)\"", data) +old_version = result.group(1) +print(f'current version: {old_version}') + Popen( f'bumpversion patch --allow-dirty'.split(' '), ).wait() @@ -17,4 +23,4 @@ f'git push origin {version}'.split(' '), ).wait() -print('done') \ No newline at end of file +print(f'done - updated to version {version}')