Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add next to the bump script #1002

Merged
merged 4 commits into from
Oct 15, 2021
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