fix GIT_SHA to work in both browser+server

This commit is contained in:
Chris Wanstrath 2025-10-08 13:18:57 -07:00
parent e35aef35cd
commit df700ffe91
2 changed files with 3 additions and 2 deletions

View File

@ -12,4 +12,6 @@ export const DEFAULT_PROJECT = "root"
export const NOSE_ROOT_BIN = join(NOSE_DIR, DEFAULT_PROJECT, "bin")
export const NOSE_STARTED = Date.now()
export const GIT_SHA = (await $`git rev-parse --short HEAD`.text()).trim()
export const GIT_SHA = (await $`git rev-parse --short HEAD`.text()).trim()
; (globalThis as any).GIT_SHA = GIT_SHA

View File

@ -3,7 +3,6 @@
import type { Child } from "hono/jsx"
import { type Context, Hono } from "hono"
import { renderToString } from "hono/jsx/dom/server"
import { join } from "path"
import { readdirSync, watch } from "fs"
import { sendAll } from "./websocket"