Added smart versioning

This commit is contained in:
Michael Mainguy 2024-06-11 16:49:20 -05:00
parent 1d94143b21
commit 540658e3d0
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"name": "immersive",
"private": true,
"version": "0.0.8-8",
"version": "0.0.8-11",
"type": "module",
"engines": {
"node": ">=18.0.0"

View File

@ -22,7 +22,8 @@ const getPackageJson = async () => {
console.log(indexHtml);
indexHtml = indexHtml.replace('@@VERSION', newVersion);
indexHtml = indexHtml.replace('@@DATE', new Date().toISOString());
const gitId = await getGitId();
const gitId = (await getGitId()).replace('\n', '');
indexHtml = indexHtml.replace('@@GIT', gitId);
await fs.writeFile('index.html', indexHtml);
}