mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-10-23 12:52:31 +00:00
let version be ENV var
This commit is contained in:
1 parent
f74dde3a5b
commit
29543ecc7c
1 file changed
+10
-3
@@ -153,10 +153,17 @@ async function build() {
|
||||
);
|
||||
console.timeEnd("Moving translations");
|
||||
|
||||
console.time("Adding git commit hash");
|
||||
const revision = child_process.execSync("git rev-parse HEAD").toString().trim();
|
||||
let revision = process.env.VER;
|
||||
if (!revision) {
|
||||
console.time("Getting git commit hash");
|
||||
revision = child_process.execSync("git rev-parse HEAD").toString().trim();
|
||||
await fs.writeFile(path.join(__dirname, "dist", "webpage", "getupdates"), revision);
|
||||
console.timeEnd("Getting git commit hash");
|
||||
}
|
||||
|
||||
console.time("Writing version");
|
||||
await fs.writeFile(path.join(__dirname, "dist", "webpage", "getupdates"), revision);
|
||||
console.timeEnd("Adding git commit hash");
|
||||
console.timeEnd("Writing version");
|
||||
|
||||
console.timeEnd("build");
|
||||
console.log("");
|
||||
|
||||
Reference in new issue
Block a user