nezha-dash-v1/scripts/get-version.js
2024-12-13 17:26:28 +08:00

8 lines
205 B
JavaScript

const { execSync } = require("child_process")
// Get the short version of the git hash
const gitHash = execSync("git rev-parse --short HEAD").toString().trim()
// Write it to stdout
console.log(gitHash)