From 7e3f7d8170b347ae9a5bbcb001454bba2f393d81 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath <2+defunkt@users.noreply.github.com> Date: Wed, 1 Oct 2025 10:14:15 -0700 Subject: [PATCH] put git sha in ther --- public/bundle.js | 3 +++ scripts/build.sh | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100755 scripts/build.sh diff --git a/public/bundle.js b/public/bundle.js index 8d3bdca..eda3a5e 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -1,3 +1,6 @@ +//// +// version: 1d6a7bc + // src/js/dom.ts var cmdLine = $("command-line"); var cmdInput = $("command-textbox"); diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..75a2c87 --- /dev/null +++ b/scripts/build.sh @@ -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