mirror of
https://github.com/wearepixel/pulsewise-collector.git
synced 2026-11-14 14:01:50 +00:00
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.
8 lines
169 B
Bash
Executable File
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})"
|