Skip to content

Commit eeb457e

Browse files
authored
New logchange.py script to simplify changelog handling in release wizard (#4413)
Refactor the wizard to generate CHANGELOG.md inside RC loop instead of before Move cherry-picking of the changelog commits to main and stable branch until after the vote
1 parent 8938b9d commit eeb457e

7 files changed

Lines changed: 615 additions & 157 deletions

File tree

.github/workflows/validate-changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
echo "Validating: $file"
9898
9999
# Validate using a Python script
100-
python3 .github/scripts/validate-changelog-yaml.py "$file"
100+
python3 dev-tools/scripts/validate-changelog-yaml.py "$file"
101101
102102
if [ $? -ne 0 ]; then
103103
VALIDATION_FAILED=true

dev-docs/changelog.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ The logchange gradle plugin offers some tasks, here are the two most important:
113113

114114
The `logchangeRelease` and `logchangeGenerate` tasks are used by ReleaseWizard. The `logchangeArchive` task can be ran once for every major release or when the number of versioned changelog folders grow too large.
115115

116-
These are integrated in the Release Wizard.
116+
These are integrated in the Release Wizard via `dev-tools/scripts/logchange.py`, which also handles RC2+ scenarios — see section 5.4.
117117

118118
=== 5.2 Migration tool
119119

@@ -231,6 +231,12 @@ Example report output (Json or Markdown):
231231
}
232232
----
233233

234+
=== 5.4 Release candidate changelog script
235+
236+
`dev-tools/scripts/logchange.py` handles changelog git operations for each RC
237+
and the final post-vote forward-porting. It is integrated into the Release
238+
Wizard but can also be run standalone. Run with `--help` for usage.
239+
234240
== 6. Further Reading
235241

236242
* https://github.com/logchange/logchange[Logchange web page]

dev-tools/scripts/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,27 @@ Each YAML file complies with the schema outlined in `dev-docs/changelog.adoc`.
182182
# Default behavior
183183
python3 dev-tools/scripts/changes2logchange.py solr/CHANGES.txt
184184

185+
### validate-changelog-yaml.py
186+
187+
Validates one or more changelog YAML files, or all YAML files in a folder.
188+
Used by the GitHub Actions workflow to validate entries on pull requests,
189+
and called automatically by `logchange.py prepare` as a pre-flight check.
190+
191+
python3 dev-tools/scripts/validate-changelog-yaml.py changelog/unreleased/my-fix.yml
192+
python3 dev-tools/scripts/validate-changelog-yaml.py changelog/unreleased/
193+
194+
### logchange.py
195+
196+
Handles changelog git operations during a release. Normally invoked by the
197+
Release Wizard, but can also be run standalone.
198+
199+
usage: logchange.py prepare [-h] --version VERSION --release-branch RELEASE_BRANCH [--gradle-cmd GRADLE_CMD]
200+
[--git-remote GIT_REMOTE] [--dry-run] [--commit]
201+
202+
usage: logchange.py forward-port [-h] --version VERSION --release-branch RELEASE_BRANCH [--gradle-cmd GRADLE_CMD]
203+
[--git-remote GIT_REMOTE] [--dry-run] --stable-branch STABLE_BRANCH
204+
[--release-date RELEASE_DATE] [--push]
205+
185206
### validateChangelogs.py
186207

187208
Validates changelog folder structure and feature distribution across development branches (main, stable, release). See dev-docs for more.

0 commit comments

Comments
 (0)