From fdc21a1efbe60eab048c4ba36ea9bc45889fec06 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 14 Jul 2026 17:44:22 +0200 Subject: Add SemVer versioning (1.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 --- install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 5b79cc3..6c7d96e 100755 --- a/install.sh +++ b/install.sh @@ -22,6 +22,7 @@ # ./install.sh --uninstall remove it set -euo pipefail +PROJECT_VERSION="1.0.0" # bump via sed across all scripts; see CLAUDE.md Releases HERE="$(cd "$(dirname "$0")" && pwd)" BINDIR="${BINDIR:-$HOME/bin}" PROG=test-build @@ -29,10 +30,12 @@ CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}/sbo-testbuild" CONF="$CONFDIR/config" OVERRIDES="$CONFDIR/overrides" -if [[ "${1:-}" == "--uninstall" ]]; then - rm -f "$BINDIR/$PROG" && echo "removed $BINDIR/$PROG" - exit 0 -fi +case "${1:-}" in + -V|--version) echo "install.sh $PROJECT_VERSION"; exit 0 ;; + --uninstall) + rm -f "$BINDIR/$PROG" && echo "removed $BINDIR/$PROG" + exit 0 ;; +esac [[ -f "$HERE/$PROG" ]] || { echo "$PROG not found in $HERE" >&2; exit 1; } mkdir -p "$BINDIR" -- cgit v1.2.3