Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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