Fetch release notes only from the main or beta branches

This commit is contained in:
cmdr2 2023-04-20 16:55:34 +05:30
parent 6c148f1791
commit bc142c9ecd

View File

@ -51,9 +51,9 @@
}
appConfig = await appConfig.json()
const updateBranch = appConfig.update_branch || 'main'
const notesBranch = (appConfig.update_branch !== "beta" ? "main" : "beta")
let releaseNotes = await fetch(`https://raw.githubusercontent.com/cmdr2/stable-diffusion-ui/${updateBranch}/CHANGES.md`)
let releaseNotes = await fetch(`https://raw.githubusercontent.com/cmdr2/stable-diffusion-ui/${notesBranch}/CHANGES.md`)
if (!releaseNotes.ok) {
console.error('[release-notes] Failed to get CHANGES.md.')
return