The development process follows a trunk-based approach. The approach uses long-lived feature branches with ephemeral bug fix branches. A key approach is to use tags on a branch and then deleting the branch; tagging a branch allows the history to be maintained and accessible.
We follow semantic versioning guidelines.
- Checkout the branch or tag to update/release, assume
main
- Apply any updates and update CHANGELOG.md with the version number to be released
- As part of updates, potentially create a bug fix branch
- After completing updates, tag the branch with the release version label
- alpha:
vn.n.n-alpha
, e.g.,v2.0.0-alpha
- beta:
vn.n.n-beta
, e.g.,v2.0.0-beta
- release candidate (RC):
vn.n.n-rc0
, e.g.,v2.0.0-rc0
,v2.0.0-rc1
- point release:
vn.n.n
, e.g.,v2.0.1
,v2.0.2
- alpha:
- Delete the bug fix branch
- On github, select the tag as the release
- Use the following template for the release notes:
# windranger-governance v2.0.1 Release Notes
This is ALPHA software - use at your own risk. WARNING: unaudited software.
This release contains the initial specifications and corresponding smart contracts for governance
that will be proposed for BitDAO.
The following steps are the default for tagging a specific branch commit (usually on a branch
labeled release/vn.n.n
):
- Ensure you have checked out the commit you wish to tag
git pull --tags --dry-run
git pull --tags
git tag -a v2.0.1 -m 'Release v2.0.1'
- optional, add the
-s
tag to create a signed commit using your PGP key (which should be added to github beforehand) git push --tags --dry-run
git push --tags
To re-create a tag:
git tag -d v2.0.0
to delete a tag locallygit push --delete origin v2.0.0
, to push the deletion to the remote- Proceed with the above steps to create a tag
To tag and build without a public release (e.g., as part of a timed security release):
- Follow the steps above for tagging locally, but do not push the tags to the repository.
- After adding the tag locally, you can build the repo
- Push the local tags
- Create a release based off the newly pushed tag
To create a tag on a branch that is then deleted:
git tag 'v2.0.1'
git branch -d my-bugfix
git push 'v2.0.1'
or (as above)git push --tags
To create a branch from a tag (whose branch has been deleted):
git fetch
git branch my-next-release 'v2.0.1'
git checkout my-next-release
- Apply updates, tag, then delete