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

chore(release): generate changelogs with git-cliff #416

Merged
merged 7 commits into from
May 8, 2023
Merged

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented May 8, 2023

We maintain separate changelogs for the tokio-console, console-api,
and console-subscriber crates.

Currently, changelogs are generated using the clog CLI tool.
However, clog does not support generating separate changelogs for
different subdirectories of a repo, so the current release process for a
given crate requires generating a changelog for the whole repo since the
last tag, and then manually editing it to remove changes to other
crates. This is a pain.

The git-cliff changelog-generating tool supports generating a
changelog that only includes commits that modified specific paths in the
repo. This means it can be used to generate separate changelogs for each
crate automatically, unlike clog. It's also much more configurable,
and we can use it to generate changelogs that have somewhat nicer
formatting (IMO).

This branch changes changelog generation from using clog to use
git-cliff, and regenerates all the existing changelogs. The included
bin/update-changelog.sh shell script updates the changelog for a given
crate to the provided tag. This will make the release process much less
complicated.

A subsequent PR will add a shell script that handles updating crate
versions, generating the changelog, and publishing the crate and tag, so
that a release can be published by running a single command.

@hawkw hawkw requested a review from a team as a code owner May 8, 2023 16:54
@hawkw hawkw enabled auto-merge (squash) May 8, 2023 17:47
@hawkw hawkw disabled auto-merge May 8, 2023 17:48
@hawkw hawkw merged commit 17093bc into main May 8, 2023
@hawkw hawkw deleted the eliza/git-cliff branch May 8, 2023 17:48
hawkw added a commit that referenced this pull request Sep 29, 2023
We maintain separate changelogs for the `tokio-console`, `console-api`,
and `console-subscriber` crates.

Currently, changelogs are generated using the [`clog`] CLI tool.
However, `clog` does not support generating separate changelogs for
different subdirectories of a repo, so the current release process for a
given crate requires generating a changelog for the whole repo since the
last tag, and then manually editing it to remove changes to other
crates. This is a pain.

The [`git-cliff`] changelog-generating tool supports generating a
changelog that only includes commits that modified specific paths in the
repo. This means it can be used to generate separate changelogs for each
crate automatically, unlike `clog`. It's also much more configurable,
and we can use it to generate changelogs that have somewhat nicer
formatting (IMO).

This branch changes changelog generation from using `clog` to use
`git-cliff`, and regenerates all the existing changelogs. The included
`bin/update-changelog.sh` shell script updates the changelog for a given
crate to the provided tag. This will make the release process much less
complicated. 

A subsequent PR will add a shell script that handles updating crate
versions, generating the changelog, and publishing the crate and tag, so
that a release can be published by running a single command.

[`clog`]: https://github.com/clog-tool/clog-cli
[`git-cliff`]: https://git-cliff.org/
hds added a commit that referenced this pull request Apr 12, 2024
Releasing the console crates has been a bit of a hassle. It requires
manual work run locally and as such, we have gone long periods without
releases, despite having changes which would be worth releasing.

[Release-plz] provides release automation based on GitHub actions. It
will create, and then update a PR for the next release.

Release-plz depends on [conventional commits] (which the `console`
project is already following) to determine the next version number for
each crate and then uses [cargo-semver-checks] to check that the version
bump is correct.

For the changelogs, [git-cliff] is used. Since we already started using
in #416, so we can reuse our existing `cliff.toml` config file. A small
change has been made to remove the footer, as it was getting included
multiple times in a single changelog file due to the delta updates.

**Caution**: In order to use Release-plz, a crates.io token first needs
to be added to the GitHub project. This means that anyone with PR merge
rights will be able to run a release by merging the Release PR.
Additionally, GitHub actions need to be given permission to create PRs.

[Release-plz]: https://release-plz.ieni.dev/
[conventional commits]: https://www.conventionalcommits.org/en/v1.0.0/
[cargo-semver-checks]: https://github.com/obi1kenobi/cargo-semver-checks
[git-cliff]: https://git-cliff.org/
hds added a commit that referenced this pull request Apr 12, 2024
Releasing the console crates has been a bit of a hassle. It requires
manual work run locally and as such, we have gone long periods without
releases, despite having changes which would be worth releasing.

[Release-plz] provides release automation based on GitHub actions. It
will create, and then update a PR for the next release.

Release-plz depends on [conventional commits] (which the `console`
project is already following) to determine the next version number for
each crate and then uses [cargo-semver-checks] to check that the version
bump is correct.

For the changelogs, [git-cliff] is used. Since we already started using
in #416, so we can reuse our existing `cliff.toml` config file. A small
change has been made to remove the footer, as it was getting included
multiple times in a single changelog file due to the delta updates.

**Caution**: In order to use Release-plz, a crates.io token first needs
to be added to the GitHub project. This means that anyone with PR merge
rights will be able to run a release by merging the Release PR.
Additionally, GitHub actions need to be given permission to create PRs.

The previous scripts used to release have been removed.

[Release-plz]: https://release-plz.ieni.dev/
[conventional commits]: https://www.conventionalcommits.org/en/v1.0.0/
[cargo-semver-checks]: https://github.com/obi1kenobi/cargo-semver-checks
[git-cliff]: https://git-cliff.org/
hds added a commit that referenced this pull request Jun 7, 2024
Releasing the console crates has been a bit of a hassle. It requires
manual work run locally and as such, we have gone long periods without
releases, despite having changes which would be worth releasing.

[Release-plz] provides release automation based on GitHub actions. It
will create, and then update a PR for the next release.

Release-plz depends on [conventional commits] (which the `console`
project is already following) to determine the next version number for
each crate and then uses [cargo-semver-checks] to check that the version
bump is correct.

For the changelogs, [git-cliff] is used. Since we already started using
in #416, so we can reuse our existing `cliff.toml` config file. A small
change has been made to remove the footer, as it was getting included
multiple times in a single changelog file due to the delta updates.

**Caution**: In order to use Release-plz, a crates.io token first needs
to be added to the GitHub project. This means that anyone with PR merge
rights will be able to run a release by merging the Release PR.
Additionally, GitHub actions need to be given permission to create PRs.

The previous scripts used to release have been removed.

[Release-plz]: https://release-plz.ieni.dev/
[conventional commits]: https://www.conventionalcommits.org/en/v1.0.0/
[cargo-semver-checks]: https://github.com/obi1kenobi/cargo-semver-checks
[git-cliff]: https://git-cliff.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant