From 84e227d669b6dc85e91d13f0cbcdf1a8b2b0f977 Mon Sep 17 00:00:00 2001 From: Marmaduke Woodman Date: Thu, 7 Dec 2023 16:20:44 +0100 Subject: [PATCH] bump-version --- vbjax/_version.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/vbjax/_version.py b/vbjax/_version.py index bcae5d0..0587cd2 100644 --- a/vbjax/_version.py +++ b/vbjax/_version.py @@ -1,4 +1,4 @@ -__version__ = 'v0.0.10' +__version__ = 'v0.0.11' if __name__ == '__main__': print(__version__) @@ -6,8 +6,12 @@ _, cmd, *args = sys.argv print(cmd, args) if cmd == 'tag': - os.system(f'git add vbjax/_version.py') - os.system(f'git commit -m "bump version"') - os.system(f'git tag {__version__}') - os.system(f'git push -u origin main') - os.system(f'git push -u origin {__version__}') + import subprocess + def do(cmd): + print(cmd) + subprocess.check_call(cmd.split(' ')) + do(f'/usr/bin/git add vbjax/_version.py') + do(f'/usr/bin/git commit -m bump-version') + do(f'/usr/bin/git push -u origin main') + do(f'/usr/bin/git tag {__version__}') + do(f'/usr/bin/git push -u origin {__version__}')