From 2d486f80d27de78fc86c85059373708dbcd9b073 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 29 Jul 2022 14:08:42 +0200 Subject: [PATCH] Update invoke tasks --- tasks.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tasks.py b/tasks.py index 753283c..ce8eaf5 100644 --- a/tasks.py +++ b/tasks.py @@ -109,15 +109,19 @@ def coverage(c): @task -def tag_release(c, level): +def tag_release(c, level, new_version=""): """Tag release version.""" - c.run("bumpversion --list %s --no-tag" % level) + if new_version: + new_version = f" --new-version {new_version}" + c.run(f"bumpversion --list {level} --no-tag{new_version}") @task -def tag_dev(c, level="patch"): +def tag_dev(c, level="patch", new_version=""): """Tag development version.""" - c.run("bumpversion --list %s --message='Bump develop version [ci skip]' --no-tag" % level) + if new_version: + new_version = f" --new-version {new_version}" + c.run(f"bumpversion --list {level} --message='Bump develop version [ci skip]' --no-tag{new_version}") @task(pre=[clean])