Skip to content

Commit 2865d75

Browse files
committed
Revert "Fix dev version handling in check release (jupyter-server#343)"
This reverts commit a441599.
1 parent b29955a commit 2865d75

File tree

9 files changed

+10
-40
lines changed

9 files changed

+10
-40
lines changed

.github/actions/draft-release/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ runs:
5858
export RH_SINCE=${{ inputs.since }}
5959
export RH_SINCE_LAST_STABLE=${{ inputs.since_last_stable }}
6060
export RH_STEPS_TO_SKIP=${{ inputs.steps_to_skip }}
61-
export RH_USE_CHANGELOG_VERSION=1
62-
export RH_VERSION_CREATE_TAG=1
6361
6462
# Draft Release
6563
python -m jupyter_releaser.actions.draft_release

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
author = "Project Jupyter"
2424

2525
# The full version, including alpha/beta/rc tags.
26-
release = "0.23.0.dev0"
26+
release = "0.22.3"
2727
# The short X.Y version.
2828
version = ".".join(release.split(".")[:2])
2929

jupyter_releaser/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Copyright (c) Jupyter Development Team.
22
# Distributed under the terms of the Modified BSD License.
3-
__version__ = "0.23.0.dev0"
3+
__version__ = "0.22.3"

jupyter_releaser/actions/draft_release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
os.chdir(curr_dir)
5454

5555

56-
run_action("jupyter-releaser bump-version")
56+
run_action("jupyter-releaser bump-version --use-changelog-version")
5757

5858
with make_group("Handle Check Release"):
5959
if check_release:

jupyter_releaser/cli.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,7 @@ def main(force):
141141
]
142142

143143
version_cmd_options = [
144-
click.option("--version-cmd", envvar="RH_VERSION_COMMAND", help="The version command"),
145-
]
146-
147-
version_create_tag_options = [
148-
click.option(
149-
"--version-create-tag",
150-
envvar="RH_VERSION_CREATE_TAG",
151-
is_flag=True,
152-
help="Whether to create a tag when bumping the version",
153-
),
144+
click.option("--version-cmd", envvar="RH_VERSION_COMMAND", help="The version command")
154145
]
155146

156147

@@ -317,28 +308,18 @@ def prep_git(ref, branch, repo, auth, username, git_url):
317308
@main.command()
318309
@add_options(version_spec_options)
319310
@add_options(version_cmd_options)
320-
@add_options(version_create_tag_options)
321311
@add_options(changelog_path_options)
322312
@add_options(use_changelog_version_options)
323313
@add_options(python_packages_options)
324314
@use_checkout_dir()
325-
def bump_version(
326-
version_spec,
327-
version_cmd,
328-
version_create_tag,
329-
changelog_path,
330-
use_changelog_version,
331-
python_packages,
332-
):
315+
def bump_version(version_spec, version_cmd, changelog_path, use_changelog_version, python_packages):
333316
"""Prep git and env variables and bump version"""
334317
prev_dir = os.getcwd()
335318
for python_package in [p.split(":")[0] for p in python_packages]:
336319
os.chdir(python_package)
337320
lib.bump_version(
338321
version_spec, version_cmd, changelog_path, use_changelog_version=use_changelog_version
339322
)
340-
if version_create_tag:
341-
lib.create_tag()
342323
os.chdir(prev_dir)
343324

344325

jupyter_releaser/lib.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ def bump_version(version_spec, version_cmd, changelog_path, use_changelog_versio
3030
use_changelog_version=use_changelog_version,
3131
)
3232

33-
34-
def create_tag():
3533
version = util.get_version()
36-
assert version is not None
3734

3835
# A properly parsed version will have a "major" attribute
3936
parsed = parse_version(version)
@@ -47,6 +44,7 @@ def create_tag():
4744
msg = f"Tag {tag_name} already exists!"
4845
msg += " To delete run: `git push --delete origin {tag_name}`"
4946
raise ValueError(msg)
47+
5048
return version
5149

5250

jupyter_releaser/tests/test_cli.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,7 @@ def test_bump_version_tag_exists(py_package, runner):
144144
runner(["prep-git", "--git-url", py_package])
145145
run("git tag v1.0.1", cwd=util.CHECKOUT_NAME)
146146
with pytest.raises(ValueError):
147-
runner(
148-
["bump-version", "--version-spec", "1.0.1", "--version-create-tag"],
149-
env=dict(GITHUB_ACTIONS=""),
150-
)
147+
runner(["bump-version", "--version-spec", "1.0.1"], env=dict(GITHUB_ACTIONS=""))
151148

152149

153150
def test_list_envvars(runner):
@@ -186,7 +183,6 @@ def test_list_envvars(runner):
186183
use-changelog-version: RH_USE_CHANGELOG_VERSION
187184
username: GITHUB_ACTOR
188185
version-cmd: RH_VERSION_COMMAND
189-
version-create-tag: RH_VERSION_CREATE_TAG
190186
version-spec: RH_VERSION_SPEC
191187
""".strip()
192188
)

jupyter_releaser/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def run(cmd, **kwargs):
5959
quiet_error = kwargs.pop("quiet_error", False)
6060
show_cwd = kwargs.pop("show_cwd", False)
6161
quiet = kwargs.pop("quiet", False)
62-
echo = kwargs.pop("echo", True)
62+
echo = kwargs.pop("echo", False)
6363

6464
if echo:
6565
prefix = "COMMAND"

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "jupyter_releaser"
7-
version = "0.23.0.dev0"
7+
version = "0.22.3"
88
description = "Jupyter Releaser for Python and/or npm packages."
99
license = {file = "LICENSE"}
1010
authors = [{name = "Jupyter Development Team", email = "[email protected]"}]
@@ -58,7 +58,7 @@ test = [
5858
jupyter-releaser = "jupyter_releaser.cli:main"
5959

6060
[tool.tbump.version]
61-
current = "0.23.0.dev0"
61+
current = "0.22.3"
6262
regex = '''
6363
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
6464
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
@@ -80,9 +80,6 @@ src = "docs/source/conf.py"
8080
[tool.jupyter-releaser]
8181
skip = ["check-links"]
8282

83-
[tool.jupyter-releaser.options]
84-
post-version-spec = "dev"
85-
8683
[tool.jupyter-releaser.hooks]
8784
after-draft-release = "bash ./.github/scripts/bump_tag.sh"
8885

0 commit comments

Comments
 (0)