Skip to content

Commit 160a886

Browse files
authored
Merge pull request #256 from blink1073/allow-minor
2 parents 0082d05 + f15f7a7 commit 160a886

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
100100
docs:
101101
runs-on: ubuntu-20.04
102-
timeout-minutes: 5
102+
timeout-minutes: 10
103103
defaults:
104104
run:
105105
shell: bash -l {0}

docs/source/get_started/making_first_release.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ already uses Jupyter Releaser.
4242
![Draft Changelog Workflow Dialog](../images/draft_changelog.png)
4343
4444
- The "New Version Spec" will usually be the full version (e.g. 0.7.1). Repos using `tbump` can also use the "next"
45-
option, which will bump the micro version (or the build version in the case of a prerelease).
45+
option, which will bump the micro version (or the build version in the case of a prerelease). The "minor" option allows projects using "tbump" to bump
46+
to the next minor version directly.
4647
- Use the "since" field to select PRs prior to the latest tag to include in the release
4748
- Type "true" in the "since the last stable git tag" if you would like to include PRs since the last non-prerelease version tagged on the target repository and branch.
4849
- The workflow will use the GitHub API to find the relevant pull requests and make an appropriate changelog entry.

jupyter_releaser/tests/test_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ def test_bump_version(py_package):
205205
assert util.get_version() == "1.0.3a6"
206206
util.bump_version("1.0.3.dev1")
207207
util.bump_version("next")
208-
assert util.get_version() == "1.0.3.dev2"
208+
assert util.get_version() == "1.0.3"
209+
util.bump_version("minor")
210+
assert util.get_version() == "1.1.0"
209211

210212

211213
def test_get_config_python(py_package):

jupyter_releaser/util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,15 @@ def bump_version(version_spec, version_cmd=""):
220220
v = parse_version(get_version())
221221
if version_spec == "next":
222222
if v.is_devrelease:
223-
version_spec = f"{v.major}.{v.minor}.{v.micro}.dev{v.dev + 1}"
223+
version_spec = f"{v.major}.{v.minor}.{v.micro}"
224224
elif v.is_prerelease:
225225
version_spec = f"{v.major}.{v.minor}.{v.micro}{v.pre[0]}{v.pre[1] + 1}"
226226
else:
227227
version_spec = f"{v.major}.{v.minor}.{v.micro + 1}"
228228
elif version_spec == "patch":
229229
version_spec = f"{v.major}.{v.minor}.{v.micro + 1}"
230+
elif version_spec == "minor":
231+
version_spec = f"{v.major}.{v.minor + 1}.0"
230232

231233
# Bump the version
232234
run(f"{version_cmd} {version_spec}")

0 commit comments

Comments
 (0)