shortsha, version command

This commit is contained in:
Chris Wanstrath 2025-10-01 12:20:11 -07:00
parent f06425f7ff
commit 062640c390
2 changed files with 5 additions and 1 deletions

4
bin/version.ts Normal file
View File

@ -0,0 +1,4 @@
import { GIT_SHA } from "@/config"
export default function () {
return GIT_SHA
}

View File

@ -13,4 +13,4 @@ export const NOSE_WWW = join(NOSE_DIR, "www")
export const NOSE_DATA = resolve("./data") export const NOSE_DATA = resolve("./data")
export const NOSE_STARTED = Date.now() export const NOSE_STARTED = Date.now()
export const GIT_SHA = (await $`git rev-parse HEAD`.text()).trim() export const GIT_SHA = (await $`git rev-parse --short HEAD`.text()).trim()