Skip to content

Commit

Permalink
Merge pull request #19 from DIDIRUS4/feature-1
Browse files Browse the repository at this point in the history
  • Loading branch information
DIDIRUS4 authored Jul 2, 2024
2 parents 40ab5ae + 3751d6c commit 6083625
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion theseus_gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "theseus_gui",
"private": true,
"version": "0.7.2",
"patch_version": "10 • Beta",
"patch_version": "11 • Beta",
"development_build": true,
"type": "module",
"scripts": {
Expand Down
45 changes: 25 additions & 20 deletions theseus_gui/src/helpers/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const v = `v`
const localVersion = `${v}${version}${patch_version}`
const macExtension = `.dmg`
const windowsExtension = `.msi`
const linuxExtension = `.deb`
const blacklistDevBuilds = `DEV_BUILD`

export async function getBranches() {
Expand Down Expand Up @@ -80,12 +79,17 @@ export async function forceRefreshRemote(disableElementId, autoUpdate) {
} else {
remoteVersion = latestRelease
}
if (remoteVersion && remoteVersion.startsWith(localVersion)) {
updateAvailable.value = false
blockDownload.value = true
} else if (remoteVersion && remoteVersion.startsWith(v)) {
updateAvailable.value = true
blockDownload.value = false
if (os.value.toLowerCase() == 'MacOS'.toLowerCase() || os.value.toLowerCase() == 'Windows'.toLowerCase()) {
if (remoteVersion && remoteVersion.startsWith(localVersion)) {
updateAvailable.value = false
blockDownload.value = true
} else if (remoteVersion && remoteVersion.startsWith(v)) {
updateAvailable.value = true
blockDownload.value = false
} else {
updateAvailable.value = false
blockDownload.value = true
}
} else {
updateAvailable.value = false
blockDownload.value = true
Expand All @@ -108,7 +112,7 @@ export async function forceRefreshRemote(disableElementId, autoUpdate) {
}
}


} else if (os.value.toLowerCase() == 'Windows'.toLowerCase()) {
for (let i of buildType) {
if (i.name.endsWith(windowsExtension) && !i.name.startsWith(blacklistDevBuilds)) {
Expand All @@ -118,19 +122,20 @@ export async function forceRefreshRemote(disableElementId, autoUpdate) {
break
}
}
} else if (os.value.toLowerCase() == "Linux".toLowerCase()) {
console.warn(
"[AR • Warning] • Due to some circumstances, we can't fully determine the structure and condition of your Linux OS," +
" so we'll download the latest build for the latest ubuntu, that we've available. Installation is done manually")
for (let i of buildType) {
if (i.name.endsWith(linuxExtension) && !i.name.startsWith(blacklistDevBuilds)) {
fileName = i.name
console.log(i.browser_download_url)
await downloadBuild(i.browser_download_url, fileName, os.value, false)
break
}
}
}
// else if (os.value.toLowerCase() == "Linux".toLowerCase()) {
// console.warn(
// "[AR • Warning] • Due to some circumstances, we can't fully determine the structure and condition of your Linux OS," +
// " so we'll download the latest build for the latest ubuntu, that we've available. Installation is done manually")
// for (let i of buildType) {
// if (i.name.endsWith(linuxExtension) && !i.name.startsWith(blacklistDevBuilds)) {
// fileName = i.name
// console.log(i.browser_download_url)
// await downloadBuild(i.browser_download_url, fileName, os.value, false)
// break
// }
// }
// }
buildInstalling.value = false;
}
})
Expand Down

0 comments on commit 6083625

Please sign in to comment.