From ab52f48e50d0dd242ad5b0cfbee9c458946cd427 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Tue, 11 Aug 2026 08:37:25 -0400 Subject: Show the build's commit in the page footer Workers can't shell out at request time, so the commit has to be baked in before wrangler bundles the sources. compile-views.ts grows a second job and becomes scripts/build.ts: alongside the precompiled views it writes src/commit.generated.ts with `git describe --tags --always --dirty`, which yields a bare short hash until the repo is tagged and marks builds made from an unclean working copy. Co-Authored-By: Claude Opus 5 --- cgithub/src/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cgithub/src/worker.ts') diff --git a/cgithub/src/worker.ts b/cgithub/src/worker.ts index 024b01a..7bf9100 100644 --- a/cgithub/src/worker.ts +++ b/cgithub/src/worker.ts @@ -5,7 +5,7 @@ import { createApp } from "./app.ts"; import { views } from "./views.generated.ts"; // Workers disallow runtime code generation, so templates are precompiled by -// scripts/compile-views.ts and preloaded into Eta's cache here. With +// scripts/build.ts and preloaded into Eta's cache here. With // cache: true, Eta serves them from the cache and never compiles. const eta = new Eta({ cache: true }); -- cgit v1.3.1