fix(update): show commit hash in output to verify code changes

This commit is contained in:
Claus Lohmar 2026-06-14 18:12:52 +00:00
parent 3e32968df8
commit 936c3e6146

View file

@ -25,6 +25,7 @@ rm -rf "$REPO_DIR" 2>/dev/null
git clone --depth 1 "$REPO_URL" "$REPO_DIR" --quiet
VERSION=$(cat "$REPO_DIR/VERSION" 2>/dev/null || echo "dev")
COMMIT_SHA=$(cd "$REPO_DIR" && git rev-parse --short HEAD 2>/dev/null || echo "unknown")
# Build
cd "$REPO_DIR/src"
@ -47,7 +48,7 @@ sleep 2
# Verify
if curl -s --max-time 3 http://localhost:8080/api/health | grep -q ok; then
ok "NextWks updated to v${VERSION}"
ok "NextWks updated to v${VERSION} (${COMMIT_SHA})"
info "Users bootstrapped from Authelia"
else
echo "Health check failed — check: sudo journalctl -u nextwks -n 20"