diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-14 17:44:22 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-14 17:44:22 +0200 |
| commit | fdc21a1efbe60eab048c4ba36ea9bc45889fec06 (patch) | |
| tree | fb3f96ebb573193b290a2084feb8505d244b3c1b /image-builder | |
| parent | 15ec43e46c94adac00a92099f324f74e16ae36b4 (diff) | |
| download | sbo-dockerbuild-1.0.0.tar.gz sbo-dockerbuild-1.0.0.zip | |
Add SemVer versioning (1.0.0)v1.0.0
Bake a PROJECT_VERSION="1.0.0" const into every script (test-build,
install.sh, and the three image-builder/*.sh). test-build and install.sh
expose -V/--version; the image-builder scripts already use --version for
the Slackware target, so their project-version flag is -V only. bootstrap.sh
handles -V before its root check so it is queryable as any user.
No VERSION file: a release bump is one sed over the consts, anchored on
^PROJECT_VERSION= so it never hits the SBo package VERSION/OPT_VERSION vars.
Release procedure documented in CLAUDE.md; user-facing note in README.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'image-builder')
| -rwxr-xr-x | image-builder/bootstrap.sh | 4 | ||||
| -rwxr-xr-x | image-builder/build-full-image.sh | 2 | ||||
| -rwxr-xr-x | image-builder/build-sbo-testbuild.sh | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/image-builder/bootstrap.sh b/image-builder/bootstrap.sh index 273afc8..ea76413 100755 --- a/image-builder/bootstrap.sh +++ b/image-builder/bootstrap.sh @@ -14,11 +14,15 @@ # bootstrap.sh — build the sbo-base:{ver} image FROM scratch from NAS trees. # Run as root (installpkg). Adapted from forge slackware/docker-images. set -euo pipefail +PROJECT_VERSION="1.0.0" # bump via sed across all scripts; see CLAUDE.md Releases HERE="$(cd "$(dirname "$0")" && pwd)" source "${HERE}/config" LOG_TAG=bootstrap source "${HERE}/lib.sh" +# -V before the root check so version is queryable as any user. +[[ "${1:-}" == "-V" ]] && { echo "bootstrap.sh $PROJECT_VERSION"; exit 0; } + REGISTRY_IMAGE="${REGISTRY}/sbo-base" [[ "${EUID}" -eq 0 ]] || _err "run as root." mkdir -p "${HASH_DIR}" diff --git a/image-builder/build-full-image.sh b/image-builder/build-full-image.sh index a2fdb18..0854d4a 100755 --- a/image-builder/build-full-image.sh +++ b/image-builder/build-full-image.sh @@ -14,6 +14,7 @@ # build-full-image.sh — sbo-full:{ver} FROM sbo-base:{ver}, all series. # Adapted from forge slackware/docker-images. No root needed. set -euo pipefail +PROJECT_VERSION="1.0.0" # bump via sed across all scripts; see CLAUDE.md Releases HERE="$(cd "$(dirname "$0")" && pwd)" source "${HERE}/config" LOG_TAG=full @@ -31,6 +32,7 @@ FORCE=false OPT_VERSION="" while [[ $# -gt 0 ]]; do case "$1" in + -V) echo "build-full-image.sh $PROJECT_VERSION"; exit 0 ;; --version) OPT_VERSION="$2"; shift 2 ;; --force) FORCE=true; shift ;; *) _err "unknown argument: $1" ;; diff --git a/image-builder/build-sbo-testbuild.sh b/image-builder/build-sbo-testbuild.sh index a246b79..0d1e07b 100755 --- a/image-builder/build-sbo-testbuild.sh +++ b/image-builder/build-sbo-testbuild.sh @@ -15,6 +15,7 @@ # Adds sbopkg + sbo-maintainer-tools from prebuilt .txz in PKGDIR. # Rebuilds when the full image OR the .txz set changes. set -euo pipefail +PROJECT_VERSION="1.0.0" # bump via sed across all scripts; see CLAUDE.md Releases HERE="$(cd "$(dirname "$0")" && pwd)" source "${HERE}/config" LOG_TAG=testbuild @@ -29,6 +30,7 @@ FORCE=false OPT_VERSION="" while [[ $# -gt 0 ]]; do case "$1" in + -V) echo "build-sbo-testbuild.sh $PROJECT_VERSION"; exit 0 ;; --version) OPT_VERSION="$2"; shift 2 ;; --force) FORCE=true; shift ;; *) _err "unknown argument: $1" ;; |
