Skip to content

Commit

Permalink
wip: add version to env
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Sep 24, 2024
1 parent 3082ff0 commit d4a2452
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/frontend/scripts/createEnvFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export const createEnvFile = async () => {
.map(([key, value]) => `${key}: "${value}"`)
.join(",\n");

const contentJs = `window.ENV = { ${values} };`;
const version = "0.1.0." + Math.floor(Date.now() / 1000).toString(16);

const contentJs = `window.ENV = { ${values}, VERSION: "${version}" };`;

await fs.writeFile("./dist/env.js", contentJs);
};
Expand Down

0 comments on commit d4a2452

Please sign in to comment.