feat: Add release.sh script and detect breaking changes (#5366)

This commit introduces three new scripts:

- `release.sh` To be run by a user on their local machine to preview and
  create a new release (tag + push)
- `check_commit_metadata.sh` For e.g. detecting breaking changes
- `genereate_release_notes.sh` To display the generated release notes,
  used for previews and in `publish_release.sh`

The `release.sh` script can be run without arguments, and it will
automatically determine if we're to do a patch or minor release. A minor
release can be forced via `--minor` flag.

Breaking changes can be annotated either via commit/merge title prefix
(`feat!:`, `feat(api)!:`), or by adding the `release/breaking` label to
the PR that was merged (on GitHub).

Related #5233
This commit is contained in:
Mathias Fredriksson
2022-12-15 15:41:30 +02:00
committed by GitHub
parent 4bc420dc48
commit e96fdbed26
6 changed files with 390 additions and 16 deletions
+6
View File
@@ -131,6 +131,12 @@ isdarwin() {
[[ "${OSTYPE:-darwin}" == *darwin* ]]
}
# issourced returns true if the script that sourced this script is being
# sourced by another.
issourced() {
[[ "${BASH_SOURCE[1]}" != "$0" ]]
}
# We don't need to check dependencies more than once per script, but some
# scripts call other scripts that also `source lib.sh`, so we set an environment
# variable after successfully checking dependencies once.