This document aims to describe how to perform a release of the Horreum python library.
The versioning pattern should follow the Horreum versioning scheme to keep coherence among all Horreum-related projects versions.
In order to perform the following release procedure correctly, certain prerequisites must be met:
- Installed
git
. - Installed
poetry
python package, refer to the doc for more details. - Installed
yq
linux tool, refer to its doc. - Enough privileges to push new branches in this repository.
- Enough privileges to push new commit in the
main
branch (note this is temporary requirement, in future direct pushes will be disallowed).
Note that releases (i.e., actual git tags) are performed from the corresponding stable branch.
This procedure should be executed from the main
branch, thus, checkout that branch.
git checkout main
Update the project for the next development cycle by running:
./scripts/next-dev-cycle.sh
This will create the new stable branch given the current development version.
E.g., if the current version is 0.14.dev
, it will create 0.14.x
stable branch.
After that, it will update the current main
branch by updating to the next development cycle.
You should see a new commit like Next is <VERSION>
highlight the next release cycle.
This commit adds the newly created stable branch to the CICD jobs, i.e., ci.yaml
and backport.yaml
.
To double-check the version, run:
poetry version
# horreum 0.15.dev
All changes have been performed locally, you now need to push those changes remotely:
# push main branch
git push origin main
# push newly created stable branch
STABLE_BRANCH=...
git push origin $STABLE_BRANCH
Checkout the stable branch from which you want to tag a new release.
STABLE_BRANCH=...
git checkout $STABLE_BRANCH
Update the version and create a git tag by running:
./scripts/update-version.sh -t -u
Where:
-t
, ensure the script creates a new tag.-u
, update the HORREUM_BRANCH in the makefile.- The scripts will output the new version, prefix it with
v
to obtain the tag.
Update to the next development version by running:
./scripts/update-version.sh -d
Where:
-d
, marks the version as development one.- The scripts will output the new version.
Commit and push changes:
git commit -am "Next is <NEXT_DEV_VERSION>"
git push origin $STABLE_BRANCH
LATEST_TAG=...
git push origin $LATEST_TAG