Skip to content

Commit

Permalink
Update invoke tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Jul 29, 2022
1 parent b0b8e9c commit 2d486f8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 2d486f8

Please sign in to comment.