nezha-dash-v1/scripts/get-version.js
2024-12-03 15:16:36 +08:00

8 lines
208 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);