Environment Variable for dev branch
This commit is contained in:
parent
cbe3a92bf6
commit
185497ab46
2 changed files with 9 additions and 1 deletions
8
index.js
8
index.js
|
@ -289,6 +289,14 @@ function pageUpdate() {
|
||||||
|
|
||||||
html = html.replace("{THUMBOR}", getThumbor())
|
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)
|
fs.writeFileSync(path.join(__dirname, 'static/index.html'), html)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<br>
|
<br>
|
||||||
<p class="chip"><a href="https://blog.violets-purgatory.dev">Blog</a></p>
|
<p class="chip"><a href="https://blog.violets-purgatory.dev">Blog</a></p>
|
||||||
<p class="chip"><a href="./faq">FAQ</a></p>
|
<p class="chip"><a href="./faq">FAQ</a></p>
|
||||||
<p class="chip"><a href="https://beta.violets-purgatory.dev">Beta</a></p>
|
<p class="chip"><a href="https://{OPPOSITE_URL}.violets-purgatory.dev">{OPPOSITE_BRANCH}</a></p>
|
||||||
{LANYARD_QUOTE}
|
{LANYARD_QUOTE}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue