Skip to content

Commit

Permalink
Merge pull request #1002 from jtpio/bump-script
Browse files Browse the repository at this point in the history
Add next to the bump script
  • Loading branch information
trungleduc authored Oct 15, 2021
2 parents 3d83258 + f166a09 commit 219bed7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/bump-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from jupyter_releaser.util import is_prerelease, get_version, run


OPTIONS = ["major", "minor", "release", "build"]
OPTIONS = ["major", "minor", "release", "build", "patch", "next"]


def patch(force=False):
Expand All @@ -36,10 +36,6 @@ def patch(force=False):
def update(spec, force=False):
prev = get_version()

# Make sure we have a valid version spec.
if spec not in OPTIONS:
raise Exception(f"Version spec must be one of: {OPTIONS}")

is_final = not is_prerelease(prev)

if is_final and spec == "release":
Expand Down Expand Up @@ -94,6 +90,10 @@ def bump(force, spec):
if len(status) > 0:
raise Exception("Must be in a clean git state with no untracked files")

# Make sure we have a valid version spec.
if spec not in OPTIONS:
raise ValueError(f"Version spec must be one of: {OPTIONS}")

prev = get_version()
is_final = not is_prerelease(prev)
if spec == "next":
Expand Down

0 comments on commit 219bed7

Please sign in to comment.