diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-02-07 15:42:07 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-02-07 15:42:07 -1000 |
| commit | d793e16f336189d38a9d43310713dd13e3b7c438 (patch) | |
| tree | b1e53d42069619912e683ddd1a58ed67b1873190 /cmd/dashboard/main.go | |
| parent | 0620afc98fdc0f764e82807bb0090b78618ddb1d (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 'cmd/dashboard/main.go')
| -rw-r--r-- | cmd/dashboard/main.go | 9 |
1 files changed, 8 insertions, 1 deletions
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() |
