diff --git a/bin/version.ts b/bin/version.ts new file mode 100644 index 0000000..7524054 --- /dev/null +++ b/bin/version.ts @@ -0,0 +1,4 @@ +import { GIT_SHA } from "@/config" +export default function () { + return GIT_SHA +} \ No newline at end of file diff --git a/src/config.ts b/src/config.ts index 69d982b..4d45951 100644 --- a/src/config.ts +++ b/src/config.ts @@ -13,4 +13,4 @@ export const NOSE_WWW = join(NOSE_DIR, "www") export const NOSE_DATA = resolve("./data") export const NOSE_STARTED = Date.now() -export const GIT_SHA = (await $`git rev-parse HEAD`.text()).trim() \ No newline at end of file +export const GIT_SHA = (await $`git rev-parse --short HEAD`.text()).trim() \ No newline at end of file