chore(monorepo): adapt update-build-info

This commit is contained in:
Elian Doran
2025-04-18 16:46:34 +03:00
parent a271e57ac1
commit c62fb0fb54
3 changed files with 4 additions and 4 deletions
-21
View File
@@ -1,21 +0,0 @@
import child_process from "child_process";
import fs from "fs";
function getBuildDate() {
const now = new Date();
now.setMilliseconds(0);
return now.toISOString().replace(".000", "");
}
function getGitRevision() {
return child_process.execSync('git log -1 --format="%H"').toString("utf-8").trimEnd();
}
const output = `\
export default {
buildDate: "${getBuildDate()}",
buildRevision: "${getGitRevision()}"
};
`;
fs.writeFileSync("src/services/build.ts", output);
+1 -2
View File
@@ -43,8 +43,7 @@
"dev:format-check": "eslint -c eslint.format.config.js .",
"dev:format-fix": "eslint -c eslint.format.config.js . --fix",
"dev:linter-check": "eslint .",
"dev:linter-fix": "eslint . --fix",
"chore:update-build-info": "tsx bin/update-build-info.ts",
"dev:linter-fix": "eslint . --fix",
"chore:generate-document": "cross-env nodemon ./bin/generate_document.ts 1000",
"chore:generate-openapi": "tsx bin/generate-openapi.js"
},