Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Linux auto update #19

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading