Skip to content

Commit

Permalink
Update tasks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
protoroto committed Aug 3, 2023
1 parent c05ae8c commit d09cb10
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 @@ -108,12 +108,16 @@ 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}")

0 comments on commit d09cb10

Please sign in to comment.