Files
pulsewise-collector/build.sh
T
Joel Male c2241e8d87 feat: add auto-update with --no-auto-update flag
Collector now checks for updates at startup (after 30s) and every 6h.
When a newer version is detected via the /collector/release/latest endpoint,
it downloads the new binary, atomically replaces itself, then re-execs
in-place so the service manager sees no interruption.

Auto-update is enabled by default; pass --no-auto-update to disable.
Version is injected at build time via -ldflags for release builds.
2026-02-25 14:36:42 +10:00

8 lines
169 B
Bash
Executable File

#!/bin/bash
set -e
VERSION="${VERSION:-0.1.0}"
go build -ldflags "-X main.version=${VERSION}" -o pulsewise-collector .
echo "Built: pulsewise-collector (v${VERSION})"