Added get version stuff to build docker #70

This commit is contained in:
2022-10-21 19:25:17 +02:00
parent 47f294a982
commit 46ed616560
9 changed files with 195 additions and 55 deletions

View File

@@ -57,6 +57,15 @@ async function setVersion(version: SoftwareVersion) {
fs.writeFile(jsonFilePath, JSON.stringify(settings, null, 4), "utf8", () => {
});
});
fs.readFile('./package.json', "utf8", (err: Error, data: string) => {
if (err) {
throw err;
}
const settings = JSON.parse(data);
settings.version = version.getVersionString();
fs.writeFile('./package.json', JSON.stringify(settings, null, 4), "utf8", () => {
});
});
}
Main();