Skip to content

Commit fe9727a

Browse files
authored
Add rooster release management configuration and instructions (#8567)
I'd rather not be the only one who can easily generate our changelog entries so I invested some time to get Rooster a bit further along and add instructions.
1 parent 3ebaca5 commit fe9727a

File tree

3 files changed

+46
-33
lines changed

3 files changed

+46
-33
lines changed

.github/release.yml

-29
This file was deleted.

CONTRIBUTING.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,18 @@ even patch releases may contain [non-backwards-compatible changes](https://semve
315315

316316
### Creating a new release
317317

318-
1. Update the version with `rg 0.0.269 --files-with-matches | xargs sed -i 's/0.0.269/0.0.270/g'`
319-
1. Update `BREAKING_CHANGES.md`
320-
1. Create a PR with the version and `BREAKING_CHANGES.md` updated
318+
We use an experimental in-house tool for managing releases.
319+
320+
1. Install `rooster`: `pip install git+https://github.com/zanieb/rooster@main`
321+
1. Run `rooster release`; this command will:
322+
- Generate a changelog entry in `CHANGELOG.md`
323+
- Update versions in `pyproject.toml` and `Cargo.toml`
324+
- Update references to versions in the `README.md` and documentation
325+
1. The changelog should then be editorialized for consistency
326+
- Often labels will be missing from pull requests they will need to be manually organized into the proper section
327+
- Changes should be edited to be user-facing descriptions, avoiding internal details
328+
1. Highlight any breaking changes in `BREAKING_CHANGES.md`
329+
1. Create a pull request with the changelog and version updates
321330
1. Merge the PR
322331
1. Run the release workflow with the version number (without starting `v`) as input. Make sure
323332
main has your merged PR as last commit
@@ -330,7 +339,11 @@ even patch releases may contain [non-backwards-compatible changes](https://semve
330339
1. Attach artifacts to draft GitHub release
331340
1. Trigger downstream repositories. This can fail non-catastrophically, as we can run any
332341
downstream jobs manually if needed.
333-
1. Create release notes in GitHub UI and promote from draft.
342+
1. Publish the GitHub release
343+
1. Open the draft release in the GitHub release section
344+
1. Copy the changelog for the release into the GitHub release
345+
- See previous releases for formatting of section headers
346+
1. Generate the contributor list with `rooster contributors` and add to the release notes
334347
1. If needed, [update the schemastore](https://github.com/charliermarsh/ruff/blob/main/scripts/update_schemastore.py)
335348
1. If needed, update the `ruff-lsp` and `ruff-vscode` repositories.
336349

pyproject.toml

+29
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,32 @@ force-exclude = '''
6969
| crates/ruff_python_formatter/resources
7070
)/
7171
'''
72+
73+
[tool.rooster]
74+
major_labels = [] # Ruff never uses the major version number
75+
minor_labels = ["breaking"] # Bump the minor version on breaking changes
76+
77+
changelog_ignore_labels = ["internal"]
78+
79+
changelog_sections.breaking = "Breaking changes"
80+
changelog_sections.preview = "Preview features"
81+
changelog_sections.rule = "Rule changes"
82+
changelog_sections.formatter = "Formatter"
83+
changelog_sections.cli = "CLI"
84+
changelog_sections.configuration = "Configuration"
85+
changelog_sections.bug = "Bug fixes"
86+
changelog_sections.__unknown__ = "Other changes"
87+
88+
# We exclude contributors from the CHANGELOG file
89+
# Generate separately with `rooster contributors` for the GitHub release page
90+
changelog_contributors = false
91+
92+
version_files = [
93+
"README.md",
94+
"docs/integrations.md",
95+
"crates/flake8_to_ruff/Cargo.toml",
96+
"crates/ruff_cli/Cargo.toml",
97+
"crates/ruff_linter/Cargo.toml",
98+
"crates/ruff_shrinking/Cargo.toml",
99+
"scripts/benchmarks/pyproject.toml",
100+
]

0 commit comments

Comments
 (0)