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

release: generate CHANGELOG from git history #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sauterp
Copy link
Member

@sauterp sauterp commented Jul 26, 2024

Running this in the CSI repo you'd see something like this:

❯ make prepare-release
Error: NEW_VERSION is not set. Usage: make prepare-release NEW_VERSION=vX.Y.Z
make: *** [/home/sauterp/src/github.com/exoscale/exoscale-csi-driver/go.mk/release.mk:85: prepare-release] Error 1

❯ make prepare-release NEW_VERSION=v0.29.7
[philippsauter/sc-101978/csi-automate-manifest-release 97f6adf] Prepare release
 1 file changed, 62 deletions(-)
 delete mode 100644 CHANGELOG.md
make[1]: Entering directory '/home/sauterp/src/github.com/exoscale/exoscale-csi-driver'
./go.mk/scripts/generate-release-notes-for-tag.sh v0.29.7 >> CHANGELOG.md
./go.mk/scripts/generate-release-notes-for-tag.sh v0.29.6 >> CHANGELOG.md
./go.mk/scripts/generate-release-notes-for-tag.sh v0.29.5 >> CHANGELOG.md
./go.mk/scripts/generate-release-notes-for-tag.sh v0.29.4 >> CHANGELOG.md
./go.mk/scripts/generate-release-notes-for-tag.sh v0.29.3 >> CHANGELOG.md
./go.mk/scripts/generate-release-notes-for-tag.sh v0.29.2 >> CHANGELOG.md
./go.mk/scripts/generate-release-notes-for-tag.sh v0.29.1 >> CHANGELOG.md
./go.mk/scripts/generate-release-notes-for-tag.sh v0.29.0 >> CHANGELOG.md
make[1]: Leaving directory '/home/sauterp/src/github.com/exoscale/exoscale-csi-driver'
Deleted tag 'v0.29.7' (was 97f6adf)
[philippsauter/sc-101978/csi-automate-manifest-release f8b613b] Prepare release
 Date: Fri Jul 26 13:52:44 2024 +0200
 1 file changed, 53 insertions(+), 59 deletions(-)

The generated changelog will look like this https://github.com/exoscale/exoscale-csi-driver/blob/9ae7906649094e47311fff899d5499b46a9c1eb5/CHANGELOG.md

@sauterp sauterp marked this pull request as ready for review July 26, 2024 12:16
Copy link
Member

@pierre-emmanuelJ pierre-emmanuelJ left a comment

Choose a reason for hiding this comment

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

Thanks awesome!
Ideally would be ignored the commit prepare realease in the changelog, otherwise it's 👍

@sauterp
Copy link
Member Author

sauterp commented Aug 28, 2024

Thanks awesome! Ideally would be ignored the commit prepare realease in the changelog, otherwise it's 👍

I thought about this, but concluded it's better to keep the prepare release comment, because in the CSI repo we're going to generate manifests with each prepare release commits, so these commits aren't "meaningless", plus it has been spelled differently in some repos. Unless you object I'd keep them. (it's also simpler)

@sauterp sauterp force-pushed the philippsauter/sc-100477/ci-automate-changelog-md-on-release-process branch from 65beabd to 5baff22 Compare August 28, 2024 16:34
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.

4 participants