Skip to content

Commit

Permalink
WIP Don't bump changelog for a rc
Browse files Browse the repository at this point in the history
  • Loading branch information
wkoot committed Jun 14, 2024
1 parent 423650c commit c6483e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions release/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ replace = "sonar.projectVersion={new_version}"
filename = "../docs/src/changelog.md"
search = "[Unreleased]"
replace = "v{new_version} - {$RELEASE_DATE}"
exclude_bumps = ["rc-patch", "rc-minor", "rc-major"]

[[tool.bumpversion.files]]
filename = "../.env"
Expand Down
7 changes: 1 addition & 6 deletions release/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def main() -> None:
# See https://github.com/callowayproject/bump-my-version?tab=readme-ov-file#add-support-for-pre-release-versions
# for how bump-my-version deals with pre-release versions
create_rc = bump.startswith("rc") # needs to be True for case "rc", and "rc-*"
if bump.startswith("rc-"):
if bump.startswith("rc-"): # TODO - figure out how to create rc workflow with bump-my-version instead of strip "rc"
bump = bump.split("-", maxsplit=1)[1] # Create a patch, minor, or major release candidate
check_preconditions(bump, current_version, create_rc)
if check_preconditions_only:
Expand All @@ -148,11 +148,6 @@ def main() -> None:
else:
cmd.append(bump)
subprocess.run(cmd, check=True)
if create_rc:
changelog_path = get_release_folder().parent / "docs" / "src" / "changelog.md"
subprocess.run(("git", "checkout", "HEAD~1", "--", changelog_path), check=True)
subprocess.run(("git", "add", changelog_path), check=True)
subprocess.run(("git", "commit", "-m", "Reset changelog after producing release candidate"), check=True)
subprocess.run(("git", "push", "--follow-tags"), check=True)


Expand Down

0 comments on commit c6483e0

Please sign in to comment.