-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When bumping, an [Unreleased]
section is currently required. However, there is a second scenario, which is that we have published one or more beta releases, and then we want to make a full (non-prerelease) release with no further changes. In this case, we wouldn't have an [Unreleased]
section (because there were no further changes), so currently this will fail the build.
Instead of failing, or requiring a no-op change to the changelog to keep the build happy, we could edit the changelog and remove all the beta releases, but collapse their release notes into a single section under the full release version number. This has the additional benefit that a full version will have release notes that include all changes since the last full version. We would thereby lose all information about what was in the beta releases, but that is probably better for most people who ignore prerelease versions and just want to know what has changed since the last full release.
For example, given a changelog as follows, and when configured to merge prerelease versions:
Input
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [1.0.0-beta.2] - 2022-02-04
### Added
- Final polish
## [1.0.0-beta.1] - 2022-02-03
### Added
- Some features
## [0.9.0] - 2022-02-02
### Added
- 0.9.0 features
## [0.8.3] - 2022-02-01
### Added
- 0.8.3 features
## [0.8.2-beta.1] - 2022-01-30 [YANKED]
### Added
- 0.8.2 features
[1.0.0-beta.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0-beta.1...v1.0.0-beta.2
[1.0.0-beta.1]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.9.0...v1.0.0-beta.1
[0.9.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.8.0...v0.9.0
[0.8.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.8.2-beta.1...v0.8.3
[0.8.2-beta.1]: https://github.com/olivierlacan/keep-a-changelog/releases/tag/v0.8.2-beta.1
Output
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [1.0.0] - 2022-02-05
### Added
- Final polish
- Some features
## [0.9.0] - 2022-02-02
### Added
- 0.9.0 features
## [0.8.3] - 2022-02-01
### Added
- 0.8.3 features
## [0.8.2-beta.1] - 2022-01-30 [YANKED]
### Added
- 0.8.2 features
[1.0.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.9.0...v1.0.0
[0.9.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.8.3...v0.9.0
[0.8.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.8.2-beta.1...v0.8.3
[0.8.2-beta.1]: https://github.com/olivierlacan/keep-a-changelog/releases/tag/v0.8.2-beta.1