Files
Innei ee11ca157d fix: lint
Signed-off-by: Innei <i@innei.in>
2024-07-18 20:48:39 +08:00

11 lines
232 B
TypeScript

import { execSync } from "node:child_process"
export const getGitHash = () => {
try {
return execSync("git rev-parse HEAD").toString().trim()
} catch (e) {
console.error("Failed to get git hash", e)
return ""
}
}