From d793e16f336189d38a9d43310713dd13e3b7c438 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 7 Feb 2026 15:42:07 -1000 Subject: 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 --- cmd/dashboard/main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index 0553041..073364f 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -27,7 +27,14 @@ import ( "github.com/go-webauthn/webauthn/webauthn" ) +// Set via -ldflags at build time +var ( + buildCommit = "dev" + buildTime = "unknown" +) + func main() { + log.Printf("task-dashboard build=%s time=%s", buildCommit, buildTime) // Load .env file (ignore error if file doesn't exist - env vars might be set directly) _ = godotenv.Load() @@ -139,7 +146,7 @@ func main() { } // Initialize handlers - h := handlers.New(db, todoistClient, trelloClient, planToEatClient, googleCalendarClient, googleTasksClient, cfg) + h := handlers.New(db, todoistClient, trelloClient, planToEatClient, googleCalendarClient, googleTasksClient, cfg, buildCommit) // Set up router r := chi.NewRouter() -- cgit v1.2.3