fallback build URL

This commit is contained in:
SpikeHD 2022-05-07 19:44:07 -07:00
parent 7094277199
commit 8951974633
4 changed files with 9 additions and 3 deletions

View File

@ -4,6 +4,7 @@
<link rel="stylesheet" type="text/css" href="style/index.css" />
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="js/neutralino.js"></script>
<script src="js/init.js"></script>
<script src="js/windowDrag.js"></script>
<script src="js/hoverEvt.js"></script>
<script src="js/helpers.js"></script>

View File

@ -56,7 +56,12 @@ async function downloadGC(branch) {
const keystoreUrl = `https://github.com/Grasscutters/Grasscutter/raw/${branch}/keystore.p12`
// External service that allows un-authed artifact downloading
const artiUrl = `https://nightly.link/Grasscutters/Grasscutter/workflows/build/${branch}/Grasscutter.zip`
let artiUrl = `https://nightly.link/Grasscutters/Grasscutter/workflows/build/${branch}/Grasscutter.zip`
await axios.get(artiUrl).catch(e => {
// Fallback link if artifacts are not being uploaded
artiUrl = 'https://nightly.link/Grasscutters/Grasscutter/actions/runs/2284467925/Grasscutter.zip'
})
// For data files
const dataFiles = await axios.get(`https://api.github.com/repos/Grasscutters/Grasscutter/contents/data?ref=${branch}`)

View File

@ -1,5 +1,3 @@
Neutralino.init()
NL_CWD = NL_CWD.replace(/\//g, '\\')
let localeObj

2
resources/js/init.js Normal file
View File

@ -0,0 +1,2 @@
// This file is the very first loaded when the app is started.
Neutralino.init()