Files
Folo/scripts/lib.ts
T
Innei 417506c01c fix: lint
Signed-off-by: Innei <i@innei.in>
2024-07-17 20:31:45 +08:00

10 lines
211 B
TypeScript

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