From 185497ab46867769689953c2c58f288f578ccfd7 Mon Sep 17 00:00:00 2001 From: Bingus_Violet Date: Thu, 25 Jan 2024 23:15:12 -0600 Subject: [PATCH] Environment Variable for dev branch --- index.js | 8 ++++++++ resources/mainPage.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 05173e1..28257d7 100644 --- a/index.js +++ b/index.js @@ -289,6 +289,14 @@ function pageUpdate() { html = html.replace("{THUMBOR}", getThumbor()) + if (process.env.BRANCH == "dev") { + html = html.replace("{OPPOSITE_URL}", "www") + html = html.replace("{OPPOSITE_BRANCH}", "Main") + } else { + html = html.replace("{OPPOSITE_URL}", "beta") + html = html.replace("{OPPOSITE_BRANCH}", "Beta") + } + fs.writeFileSync(path.join(__dirname, 'static/index.html'), html) } diff --git a/resources/mainPage.html b/resources/mainPage.html index 6f2b1c7..45502fd 100644 --- a/resources/mainPage.html +++ b/resources/mainPage.html @@ -45,7 +45,7 @@

Blog

FAQ

-

Beta

+

{OPPOSITE_BRANCH}

{LANYARD_QUOTE}