standard-version
standard-version copied to clipboard
How can I have the changelog skip "pre-release" tags?
I'm running a use case where I'm creating a pre-release on every merged PR (e.g. 1.2.3-RC.2) When we're ready to send a release to production, we'll tag it as a standard release (1.2.3). When this happens, I want the changelog to reflect ONLY the full release versions, and combine all of the commits since the last one (1.2.2, in this particular case), not spell out every pre-release. Is this possible with some configuration?
Just spitballing here, but maybe your ci workflow can differ.
- pre-release --> don't generate the changelog
--skip.changelog
? - full release --> run the changelog.
Unless this also picks up all tags inbetween the previous release, then my idea is shot.
Thanks for the response, Brett. Sorry I wasn't clearer. When the changelog step runs, it re-generates the changelog and it picks up every release, including the pre-releases. For my usecase, I would only run the changelog step on full releases, as you mentioned, I just want the changelog to ignore pre-releases and only show the differences between the full releases.
I thought as much. I actually came here looking for a different feature but I have wanted this in the past.
I had thought of a pre-release script that nukes the pre-release tags (just locally) but I'm guessing that's a hack you've been working with. The tags should re-appear on the next fetch from your ci server.
I'd also like this feature to be configurable, so I'll continue to watch it :)
I'm looking for pretty much the exact same thing.
I am using a similar process to what @brettswift implemented in their build, but it would be super cool to have a way of just comparing major releases for the change log.
Also been wondering the same thing.
Just generated a 'full release' changelog for v1.23.0, which comprised of changes made in the pre-release versions 1.23.0-0 -> 1.23.0-2
The changelog for 1.23.0 was only the diff between 1.23.0 & 1.23.0-1, but the 1.23.0-0 release was the biggest of the lot, which excludes a lot of our changes 😕
To get around this, we have the following bash script which deletes pre-release tags before running standard-version to get around this (note the use of -v with grep)
git tag -l | grep -vE 'v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$' | xargs git tag -d
npx standard-version
git fetch origin --tags
Yeah, that's the problem. The changelog step will just regenerate the whole file, with all tags included.
On Wed, Dec 8, 2021 at 4:49 PM Brett @.***> wrote:
Just spitballing here, but maybe your ci workflow can differ.
- pre-release --> don't generate the changelog --skip.changelog ?
- full release --> run the changelog.
Unless this also picks up all tags inbetween the previous release, then my idea is shot.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/conventional-changelog/standard-version/issues/818#issuecomment-989224232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGC5EIMX2ZJA4D6PWFWXE3UP7HIHANCNFSM5C7PK2JQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@jrosen did you ever find a resolution for this?