mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Skip updater if running development version
This commit is contained in:
parent
6876cc0ec1
commit
73347d557e
2 changed files with 19 additions and 18 deletions
4
.github/workflows/dev.yml
vendored
4
.github/workflows/dev.yml
vendored
|
@ -28,8 +28,6 @@ jobs:
|
||||||
- name: Replace the version number
|
- name: Replace the version number
|
||||||
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
|
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
|
||||||
|
|
||||||
- run: cat src/utils.ts
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build && electron-builder --linux zip && electron-builder --arm64 --linux zip
|
run: npm run build && electron-builder --linux zip && electron-builder --arm64 --linux zip
|
||||||
|
|
||||||
|
@ -64,8 +62,6 @@ jobs:
|
||||||
- name: Replace the version number
|
- name: Replace the version number
|
||||||
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
|
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
|
||||||
|
|
||||||
- run: cat src/utils.ts
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build && electron-builder --macos zip
|
run: npm run build && electron-builder --macos zip
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -22,20 +22,25 @@
|
||||||
text.innerHTML = "You appear to be offline. Please connect to the internet and try again.";
|
text.innerHTML = "You appear to be offline. Please connect to the internet and try again.";
|
||||||
} else {
|
} else {
|
||||||
text.innerHTML = "Starting ArmCord...";
|
text.innerHTML = "Starting ArmCord...";
|
||||||
fetch("https://armcord.xyz/latest.json")
|
if (window.armcord.version === "DEV") {
|
||||||
.then((response) => response.json())
|
console.log("Running a development build of ArmCord. Skipping updater.");
|
||||||
.then((data) => {
|
} else {
|
||||||
if (data.version !== window.armcord.version) {
|
fetch("https://armcord.xyz/latest.json")
|
||||||
var elem = document.createElement("img");
|
.then((response) => response.json())
|
||||||
elem.classList.add("logo");
|
.then((data) => {
|
||||||
elem.src = "https://armcord.smartfridge.space/update.webp";
|
if (data.version !== window.armcord.version) {
|
||||||
document.body.prepend(elem);
|
var elem = document.createElement("img");
|
||||||
document.getElementById("splashscreen-armcord").remove();
|
elem.classList.add("logo");
|
||||||
text.innerHTML = "A new version of ArmCord is available. Please update to the latest version.";
|
elem.src = "https://armcord.smartfridge.space/update.webp";
|
||||||
} else {
|
document.body.prepend(elem);
|
||||||
console.log("ArmCord is up to date.");
|
document.getElementById("splashscreen-armcord").remove();
|
||||||
}
|
text.innerHTML =
|
||||||
});
|
"A new version of ArmCord is available. Please update to the latest version.";
|
||||||
|
} else {
|
||||||
|
console.log("ArmCord is up to date.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.armcordinternal.splashEnd();
|
window.armcordinternal.splashEnd();
|
||||||
switch (window.armcord.channel) {
|
switch (window.armcord.channel) {
|
||||||
|
|
Loading…
Reference in a new issue