From b0a0c5f6c77265632bb2ca3acd9926150592da09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20P=C3=B6mp?= Date: Wed, 8 Jan 2025 13:36:59 +0100 Subject: [PATCH] refactor(octra): fix small issues --- apps/octra/src/index.html | 10 +++++----- nx.json | 1 + runner.js | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/octra/src/index.html b/apps/octra/src/index.html index 978c7866d..0b50baee8 100644 --- a/apps/octra/src/index.html +++ b/apps/octra/src/index.html @@ -111,11 +111,11 @@ } diff --git a/nx.json b/nx.json index 29af9d05f..af8bc3d2d 100644 --- a/nx.json +++ b/nx.json @@ -15,6 +15,7 @@ "sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"] }, "nxCloudId": "677cf0775ad9512e8f749d0a", + "neverConnectToCloud": true, "targetDefaults": { "@angular-devkit/build-angular:application": { "cache": true, diff --git a/runner.js b/runner.js index 9ed877fec..7e136cce5 100644 --- a/runner.js +++ b/runner.js @@ -256,13 +256,13 @@ async function setBuildVariable() { let hash = crypto.randomUUID(); - content = content.replace(/(var BUILD =)([^;]*)(;)/gs, (g0, g1, g2, g3) => { - const build = JSON.parse(g2); + content = content.replace(/(\/\*)\s*(var BUILD =)([^;]*)(;)\s?(\*\/)\s*/gs, (g0, g1, g2, g3, g4) => { + const build = JSON.parse(g3); build.version = pkg.version; build.timestamp = new Date().toISOString(); build.hash = hash; - return `${g1} ${JSON.stringify(build)}${g3}`; + return `${g2} ${JSON.stringify(build)}${g4}`; }); await fs.writeFile('./dist/apps/octra/index.html', content, {