summaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-02-07 15:42:07 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-02-07 15:42:07 -1000
commitd793e16f336189d38a9d43310713dd13e3b7c438 (patch)
treeb1e53d42069619912e683ddd1a58ed67b1873190 /deploy.sh
parent0620afc98fdc0f764e82807bb0090b78618ddb1d (diff)
Add build version footer, deploy ldflags, template test helper, and logs script
- Display build commit hash in unobtrusive footer overlay - Inject buildCommit/buildTime via ldflags in deploy.sh - Add assertTemplateContains test helper, refactor existing template tests - Add scripts/logs for fetching production journalctl via SSH Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/deploy.sh b/deploy.sh
index abd9cfc..a201d82 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -11,7 +11,10 @@ echo "==> Building CSS..."
npm run css:build
echo "==> Building binary (linux/amd64)..."
-GOOS=linux GOARCH=amd64 go build -o app cmd/dashboard/main.go
+BUILD_COMMIT=$(git rev-parse --short HEAD)
+BUILD_TIME=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
+LDFLAGS="-X main.buildCommit=${BUILD_COMMIT} -X main.buildTime=${BUILD_TIME}"
+GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o app cmd/dashboard/main.go
echo "==> Pushing code to ${REMOTE}..."
git push ${REMOTE} master