034-footer: add commit hash to version display in footer
- vite.config.js: append short commit hash to git tag (tag+hash) - .gitignore: add *.docx Footer now shows e.g. 'v0.3.1+e07bf46b'
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -108,4 +108,5 @@ superset-tools.bundle
|
|||||||
.axiom/
|
.axiom/
|
||||||
|
|
||||||
# Generated audit reports
|
# Generated audit reports
|
||||||
axiom-mcp-tools-audit-report.md
|
axiom-mcp-tools-audit-report.md
|
||||||
|
*.docx
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ const APP_VERSION = (() => {
|
|||||||
if (process.env.APP_VERSION && process.env.APP_VERSION !== '0.0.0') {
|
if (process.env.APP_VERSION && process.env.APP_VERSION !== '0.0.0') {
|
||||||
return process.env.APP_VERSION;
|
return process.env.APP_VERSION;
|
||||||
}
|
}
|
||||||
// 2. Fall back to latest git tag (works in local dev with .git)
|
// 2. Fall back to latest git tag + short commit hash (works in local dev with .git)
|
||||||
try {
|
try {
|
||||||
return execSync('git describe --tags --abbrev=0', { encoding: 'utf8' }).trim();
|
const tag = execSync('git describe --tags --abbrev=0', { encoding: 'utf8' }).trim();
|
||||||
|
const commit = execSync('git rev-parse --short HEAD', { encoding: 'utf8' }).trim();
|
||||||
|
return `${tag}+${commit}`;
|
||||||
} catch {
|
} catch {
|
||||||
return '0.0.0';
|
return '0.0.0';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user