Skip to content

Commit

Permalink
Merge pull request #1003 from meeseeksmachine/auto-backport-of-pr-100…
Browse files Browse the repository at this point in the history
…2-on-0.2.x

Backport PR #1002 on branch 0.2.x (Add next to the bump script)
  • Loading branch information
jtpio authored Oct 15, 2021
2 parents 8befa07 + cf45f61 commit 76f1b60
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 76f1b60

Please sign in to comment.