feat: version/update subcommands, VERSION file, deploy version bumping

- Add VERSION file as canonical version source
- build.sh reads VERSION file automatically, injects via -ldflags
- deploy.sh prompts for major/minor/patch bump, injects version via
  ldflags into all 4 builds, and writes release/latest JSON file
- Add 'pulsewise-collector version' — prints version and checks for update
- Add 'pulsewise-collector update' — fetches and applies the latest release
- Default version changed to "dev" for local builds without ldflags
This commit is contained in:
Joel Male
2026-02-25 14:40:47 +10:00
parent c2241e8d87
commit 35f8ee5347
3 changed files with 62 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
VERSION="${VERSION:-0.1.0}"
VERSION="${VERSION:-$(cat VERSION)}"
go build -ldflags "-X main.version=${VERSION}" -o pulsewise-collector .
echo "Built: pulsewise-collector (v${VERSION})"