Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rooster release management configuration and instructions #8567

Merged
merged 5 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/release.yml

This file was deleted.

21 changes: 17 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,18 @@ even patch releases may contain [non-backwards-compatible changes](https://semve

### Creating a new release

1. Update the version with `rg 0.0.269 --files-with-matches | xargs sed -i 's/0.0.269/0.0.270/g'`
1. Update `BREAKING_CHANGES.md`
1. Create a PR with the version and `BREAKING_CHANGES.md` updated
We use an experimental in-house tool for managing releases.

1. Install `rooster`: `pip install git+https://github.com/zanieb/rooster@main`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the @main have an effect here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't, but until it's on PyPI I might tag versions and pin them as changes are made going forward.

We could drop it

1. Run `rooster release`; this command will:
- Generate a changelog entry in `CHANGELOG.md`
- Update versions in `pyproject.toml` and `Cargo.toml`
- Update references to versions in the `README.md` and documentation
1. The changelog should then be editorialized for consistency
- Often labels will be missing from pull requests they will need to be manually organized into the proper section
- Changes should be edited to be user-facing descriptions, avoiding internal details
1. Highlight any breaking changes in `BREAKING_CHANGES.md`
1. Create a pull request with the changelog and version updates
1. Merge the PR
1. Run the release workflow with the version number (without starting `v`) as input. Make sure
main has your merged PR as last commit
Expand All @@ -330,7 +339,11 @@ even patch releases may contain [non-backwards-compatible changes](https://semve
1. Attach artifacts to draft GitHub release
1. Trigger downstream repositories. This can fail non-catastrophically, as we can run any
downstream jobs manually if needed.
1. Create release notes in GitHub UI and promote from draft.
1. Publish the GitHub release
1. Open the draft release in the GitHub release section
1. Copy the changelog for the release into the GitHub release
- See previous releases for formatting of section headers
1. Generate the contributor list with `rooster contributors` and add to the release notes
1. If needed, [update the schemastore](https://github.com/charliermarsh/ruff/blob/main/scripts/update_schemastore.py)
1. If needed, update the `ruff-lsp` and `ruff-vscode` repositories.

Expand Down
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,32 @@ force-exclude = '''
| crates/ruff_python_formatter/resources
)/
'''

[tool.rooster]
major_labels = [] # Ruff never uses the major version number
minor_labels = ["breaking"] # Bump the minor version on breaking changes

changelog_ignore_labels = ["internal"]

changelog_sections.breaking = "Breaking changes"
changelog_sections.preview = "Preview features"
changelog_sections.rule = "Rule changes"
changelog_sections.formatter = "Formatter"
changelog_sections.cli = "CLI"
changelog_sections.configuration = "Configuration"
changelog_sections.bug = "Bug fixes"
changelog_sections.__unknown__ = "Other changes"

# We exclude contributors from the CHANGELOG file
# Generate separately with `rooster contributors` for the GitHub release page
changelog_contributors = false

version_files = [
"README.md",
"docs/integrations.md",
"crates/flake8_to_ruff/Cargo.toml",
"crates/ruff_cli/Cargo.toml",
"crates/ruff_linter/Cargo.toml",
"crates/ruff_shrinking/Cargo.toml",
"scripts/benchmarks/pyproject.toml",
]
Loading