put git sha in ther

This commit is contained in:
Chris Wanstrath 2025-10-01 10:14:15 -07:00
parent 1d6a7bc0c1
commit 7e3f7d8170
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,6 @@
////
// version: 1d6a7bc
// src/js/dom.ts
var cmdLine = $("command-line");
var cmdInput = $("command-textbox");

8
scripts/build.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
SHA=$(git rev-parse --short HEAD)
bun build ./src/js/main.js \
--outfile ./public/bundle.js \
--target browser
printf "////\n// version: %s\n\n" "$SHA" | cat - ./public/bundle.js > ./public/bundle.tmp.js
mv ./public/bundle.tmp.js ./public/bundle.js