Loading
Add release script supporting multiple module repo
Issue: #100 (closed)
This MR adds a /scripts/release.sh script properly handling releases for both the v1 and v2 module
Ex usage:
> LATEST_TAG_OVERRIDE=v2/v2.0.0 ./scripts/release.sh v2 --dry-run
Found latest release tag: v2/v2.0.0
Found 10 unreleased commit(s) for module v2.
=== Changelog Preview ===
## 2.1.0
### Features
- feat: Add new deprecations (`ca8ec851`)
- feat: update field constants from labkit-spec v1.0 (`154b4923`)
### Bug Fixes
- fix: add final //nolint:errcheck comments for multiline fmt calls (`202c0834`)
- fix: add remaining //nolint:errcheck comments (`2a57284e`)
- fix: add //nolint:errcheck to deliberately ignored errors in tests/examples (`e8e1cfaf`)
- fix: handle errors idiomatically in examples and tests (`51a2a4b8`)
=========================
Dry run: would create tag 'v2/v2.1.0' and a GitLab release.- Collect commits since latest tag, filtered for commits touching relevant module (Pathspec
v2/or:(exclude)v2/) - Determine appropriate SemVer to bump to based on conventional commit messages
- Tag and push appropriate release version
- Create a Gitlab release with a changelog, including
featsandfixesrelevant only to the specified module
Notes:
- To allow us to stay on
v1.X.Xandv2/2.X.Xthis script will never perform a major version release - Commits with conventional commit type
featwill trigger a minor release - Commits with conventional commit type
fixwill trigger a patch release
Limitations:
- Release triggering commits outside of
v2will trigger av1release. (Ex. A feat commit touchingREADME.mdwill trigger av1release.)
Testing:
- I've tested out cutting local releases using this script over at: https://gitlab.com/lhollinda/personal-release-playground
- Define and export a
LATEST_TAG_OVERRIDEto dry-run test generating a changelog and release when there are currently no unreleased changes.
Next Steps:
- This MR adds the script, but does not hook it up in CI. Developers can checkout master and cut releases for both modules manually.
Following up this MR, I plan on:
- Disabling our previous release jobs
- Removing tags for the incorrect releases we've accidentally cut (Will confirm with team before doing so. Slack ref)
- Add two CI jobs, running this script for
v1andv2on commits to master. - Update contribution / release docs
Edited by Luke Hollinda