Files
nezha-dash-v1/scripts/get-version.js
T
2025-12-28 18:05:02 +08:00

8 lines
213 B
JavaScript

const { execSync } = require("node: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);