summaryrefslogtreecommitdiff
path: root/cgithub/scripts
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-09-03 15:07:25 -0400
committerJoe Mou <dev@mou.fo>2026-09-03 23:05:33 -0400
commit439f783c9e3b18519505d1ad6b8533bea081cca0 (patch)
tree6f43005ce4e35d182fc16bc20c4df6a12c5124b9 /cgithub/scripts
parenta61a96c6d72d4297b2539f4033fbfbd0a3d178ab (diff)
Clean up renderer, redirects, and build commit
Diffstat (limited to 'cgithub/scripts')
-rw-r--r--cgithub/scripts/build.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/cgithub/scripts/build.ts b/cgithub/scripts/build.ts
index 766e5e8..76d88a0 100644
--- a/cgithub/scripts/build.ts
+++ b/cgithub/scripts/build.ts
@@ -3,7 +3,7 @@
// src/views.generated.ts - views/*.eta precompiled into plain functions.
// Workers disallow runtime code generation (`new Function`), so Eta cannot
// compile templates there at request time.
-// src/commit.generated.ts - the commit this build was made from, for the
+// src/build.generated.ts - the commit this build was made from, for the
// page footer. Workers can't shell out to git at request time either.
import { execFileSync } from "node:child_process";
import { Eta } from "eta";
@@ -35,9 +35,9 @@ console.log(`Compiled ${names.length} templates to src/views.generated.ts`);
// Untagged repositories describe as a bare short hash; --dirty marks a build
// made from an unclean working copy.
-let commit = "unknown";
+let buildCommit = "unknown";
try {
- commit = execFileSync("git", ["describe", "--tags", "--always", "--dirty"], {
+ buildCommit = execFileSync("git", ["describe", "--tags", "--always", "--dirty"], {
cwd: root,
encoding: "utf8",
}).trim();
@@ -46,7 +46,7 @@ try {
}
fs.writeFileSync(
- path.join(root, "src", "commit.generated.ts"),
- `// Generated by scripts/build.ts -- do not edit.\nexport const commit = ${JSON.stringify(commit)};\n`,
+ path.join(root, "src", "build.generated.ts"),
+ `// Generated by scripts/build.ts -- do not edit.\nexport const buildCommit = ${JSON.stringify(buildCommit)};\n`,
);
-console.log(`Wrote commit ${commit} to src/commit.generated.ts`);
+console.log(`Wrote commit ${buildCommit} to src/build.generated.ts`);