diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1965a87..5f0be7c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -139,5 +139,5 @@ jobs: uses: ncipollo/release-action@v1 with: allowUpdates: true - tag: v2.0.1 + tag: v2.0.2 artifacts: "Output/*" diff --git a/FUNC.iss b/FUNC.iss index fb960c8..8e9b4d4 100644 --- a/FUNC.iss +++ b/FUNC.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "FUNC" -#define MyAppVersion "2.0.1" +#define MyAppVersion "2.0.2" #define MyAppPublisher "Galaxy Pay, LLC" #define MyAppPublisherURL "https://galaxy-pay.com" #define MyPublishPath "publish" diff --git a/FUNC/Controllers/GoalController.cs b/FUNC/Controllers/GoalController.cs index ada6d22..b5306d4 100644 --- a/FUNC/Controllers/GoalController.cs +++ b/FUNC/Controllers/GoalController.cs @@ -79,6 +79,8 @@ public async Task> GoalUpdate(Models.Release model) release = await client.Repository.Release.Get(workspaceName, repositoryName, model.Name); } url = release?.Assets.FirstOrDefault(a => a.Name == "node.tar.gz")?.BrowserDownloadUrl; + if (url == null) return BadRequest(); + await Utils.ExecCmd($"curl -L -o {Utils.dataPath}/node.tar.gz {url}"); } else if (IsLinux()) { @@ -91,11 +93,10 @@ public async Task> GoalUpdate(Models.Release model) var latestInfo = await client.Repository.Release.GetLatest(workspaceName, repositoryName); url = latestInfo.Assets.FirstOrDefault(a => a.Name.Contains("node_stable_linux-amd64") && a.Name.EndsWith("tar.gz"))?.BrowserDownloadUrl; + if (url == null) return BadRequest(); + await Utils.ExecCmd($"wget -L -o {Utils.dataPath}/node.tar.gz {url}"); } - if (url == null) return BadRequest(); - - await Utils.ExecCmd($"curl -L -o {Utils.dataPath}/node.tar.gz {url}"); await Utils.ExecCmd($"tar -zxf {Utils.dataPath}/node.tar.gz -C {Utils.dataPath} bin"); await Utils.ExecCmd($"rm {Utils.dataPath}/node.tar.gz"); diff --git a/FUNC/Controllers/RetiController.cs b/FUNC/Controllers/RetiController.cs index 22b6387..8707f05 100644 --- a/FUNC/Controllers/RetiController.cs +++ b/FUNC/Controllers/RetiController.cs @@ -40,7 +40,7 @@ public async Task CreateRetiService(RetiCreate model) { var url = latest.Assets.FirstOrDefault(a => a.Name.Contains("linux-amd64.tar.gz"))?.BrowserDownloadUrl; if (url == null) return BadRequest(); - await Utils.ExecCmd($"curl -L -o {Utils.dataPath}/reti.tar.gz {url}"); + await Utils.ExecCmd($"wget -L -o {Utils.dataPath}/reti.tar.gz {url}"); await Utils.ExecCmd($"tar -zxf {Utils.dataPath}/reti.tar.gz -C {Path.Combine(Utils.dataPath, "reti")}"); } } @@ -108,7 +108,7 @@ public async Task UpdateReti() { var url = latest.Assets.FirstOrDefault(a => a.Name.Contains("linux-amd64.tar.gz"))?.BrowserDownloadUrl; if (url == null) return BadRequest(); - await Utils.ExecCmd($"curl -L -o {Utils.dataPath}/reti.tar.gz {url}"); + await Utils.ExecCmd($"wget -L -o {Utils.dataPath}/reti.tar.gz {url}"); await Utils.ExecCmd($"tar -zxf {Utils.dataPath}/reti.tar.gz -C {Utils.dataPath} reti"); } diff --git a/README.md b/README.md index dc98ff5..8a2eb00 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ When updating a previous installation, the installer will recommend to let it au After downloading the `.deb` file to your machine, run ```sh -sudo dpkg -i linux_func_.deb +sudo dpkg -i func__amd64.deb ``` Then visit the locally hosted webpage at (for remote access see notes below) diff --git a/create-package.sh b/create-package.sh index 6835d58..2a44271 100755 --- a/create-package.sh +++ b/create-package.sh @@ -1,6 +1,6 @@ rm -r Output -PKG=Output/func_2.0.1_amd64 +PKG=Output/func_2.0.2_amd64 mkdir -p $PKG/lib/systemd/system mkdir -p $PKG/opt/func diff --git a/deb/control b/deb/control index 5a6aaa9..c43cd05 100644 --- a/deb/control +++ b/deb/control @@ -1,5 +1,5 @@ Package: func -Version: 2.0.1 +Version: 2.0.2 Section: base Priority: optional Architecture: amd64 diff --git a/webui/package.json b/webui/package.json index d356686..e7d01e9 100644 --- a/webui/package.json +++ b/webui/package.json @@ -1,6 +1,6 @@ { "name": "func-webui", - "version": "2.0.1", + "version": "2.0.2", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build", diff --git a/webui/src/components/Settings.vue b/webui/src/components/Settings.vue index c7b0448..d93b9a6 100644 --- a/webui/src/components/Settings.vue +++ b/webui/src/components/Settings.vue @@ -74,6 +74,7 @@ const show = computed({ }); const goalVersion = ref(); +let init = false; onBeforeMount(() => { getVersion(); @@ -84,7 +85,14 @@ async function getVersion() { const version = await FUNC.api.get("goal/version"); goalVersion.value = version.data; if (goalVersion.value?.installed) store.ready = true; - else updateLatest(true); + else { + if (!init) { + init = true; + updateLatest(true); + } else { + throw Error("Download Failed"); + } + } store.updateAvailable = goalVersion.value?.latest !== goalVersion.value?.installed;