build: retrive git hash

This commit is contained in:
鲁树人 2025-03-31 04:03:27 +09:00
parent e9480ce6a4
commit 88cfbcd337

View File

@ -9,7 +9,7 @@ const __dirname = dirname(__filename);
let commitHash = process.env.GIT_COMMIT || 'unknown'; let commitHash = process.env.GIT_COMMIT || 'unknown';
try { try {
execSync('git rev-parse --short HEAD').toString('utf-8').trim(); commitHash = execSync('git rev-parse --short HEAD').toString('utf-8').trim();
} catch (e) { } catch (e) {
console.error('Failed to get commit hash:', e); console.error('Failed to get commit hash:', e);
} }