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 /install.sh | |
| parent | 15ec43e46c94adac00a92099f324f74e16ae36b4 (diff) | |
| download | sbo-dockerbuild-e97889f15fb7eaf3df27618ea5fc1fe244ff3f2c.tar.gz sbo-dockerbuild-e97889f15fb7eaf3df27618ea5fc1fe244ff3f2c.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 'install.sh')
| -rwxr-xr-x | install.sh | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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" |
