chore: introduce semver + CHANGELOG.md, cut v0.1.0
- CHANGELOG.md following Keep a Changelog; 0.1.0 entry covers all features shipped through the loaded-model indicator - build.sh now also tags the image with the version read from pyproject.toml, e.g. rg.nl-ams.scw.cloud/valinor/finrod:0.1.0 - README documents the release workflow (edit CHANGELOG, bump pyproject version, merge, tag vX.Y.Z, build, bump valinor)
This commit is contained in:
23
build.sh
23
build.sh
@@ -9,20 +9,24 @@
|
||||
# docker login rg.nl-ams.scw.cloud -u nologin -p <SCW_SECRET_KEY>
|
||||
#
|
||||
# Usage:
|
||||
# ./build.sh # tags :latest and :<short-sha>
|
||||
# TAG=v0.2.0 ./build.sh # additional explicit tag
|
||||
# ./build.sh
|
||||
#
|
||||
# Always tags:
|
||||
# :latest — moving pointer
|
||||
# :<git-short-sha> — immutable, traceable to a commit
|
||||
# :<pyproject-version> — semver from pyproject.toml (e.g. :0.1.0)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
REGISTRY="${REGISTRY:-rg.nl-ams.scw.cloud/valinor}"
|
||||
IMAGE="${REGISTRY}/finrod"
|
||||
SHA="$(git rev-parse --short HEAD)"
|
||||
TAGS=(-t "${IMAGE}:latest" -t "${IMAGE}:${SHA}")
|
||||
if [[ -n "${TAG:-}" ]]; then
|
||||
TAGS+=(-t "${IMAGE}:${TAG}")
|
||||
fi
|
||||
VERSION="$(awk -F\" '/^version =/ {print $2; exit}' pyproject.toml)"
|
||||
: "${VERSION:?Could not read version from pyproject.toml}"
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
TAGS=(-t "${IMAGE}:latest" -t "${IMAGE}:${SHA}" -t "${IMAGE}:${VERSION}")
|
||||
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
@@ -31,4 +35,7 @@ docker buildx build \
|
||||
.
|
||||
|
||||
echo
|
||||
echo "Pushed: ${IMAGE}:{latest,${SHA}${TAG:+,${TAG}}}"
|
||||
echo "Pushed:"
|
||||
echo " ${IMAGE}:latest"
|
||||
echo " ${IMAGE}:${SHA}"
|
||||
echo " ${IMAGE}:${VERSION}"
|
||||
|
||||
Reference in New Issue
Block a user