Skip to content

Commit

Permalink
Merge pull request #56 from GalaxyPay/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
acfunk authored Jan 22, 2025
2 parents 68146a7 + 5d3ad53 commit 07d73d0
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: v3.2.2
tag: v3.2.3
artifacts: "Output/*"
2 changes: 1 addition & 1 deletion FUNC.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "FUNC"
#define MyAppVersion "3.2.2"
#define MyAppVersion "3.2.3"
#define MyAppPublisher "Galaxy Pay, LLC"
#define MyAppPublisherURL "https://galaxy-pay.com"
#define MyPublishPath "publish"
Expand Down
28 changes: 26 additions & 2 deletions FUNC/Controllers/GoalController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public async Task<ActionResult<GoalVersion>> GoalVersion()
string installed = string.Empty;
string latest = string.Empty;

string goalPath = Path.Combine(Utils.appDataDir, "bin", "goal");
string version = await Utils.ExecCmd($"{goalPath} --version");
string algodPath = Path.Combine(Utils.appDataDir, "bin", "algod");
string version = await Utils.ExecCmd($"{algodPath} -v");
if (version != string.Empty)
{
int firstBreak = version.IndexOf("\n") + 1;
Expand Down Expand Up @@ -128,11 +128,35 @@ public async Task<ActionResult<string>> GoalUpdate(Models.Release model)
await s.CopyToAsync(fs);
fs.Dispose();

// Get Node Statuses
var algorandStatus = await Node.Get("algorand");
var voiStatus = await Node.Get("voi");

// Stop Running Nodes
if (algorandStatus.ServiceStatus == "Running")
{
await Node.ControlService("algorand", "stop");
}
if (voiStatus.ServiceStatus == "Running")
{
await Node.ControlService("voi", "stop");
}

using FileStream rfs = new(filePath, System.IO.FileMode.Open, FileAccess.Read);
using GZipStream gz = new(rfs, CompressionMode.Decompress, leaveOpen: true);
await TarFile.ExtractToDirectoryAsync(gz, Utils.appDataDir, true);
rfs.Dispose();

// Restart Running Nodes
if (algorandStatus.ServiceStatus == "Running")
{
await Node.ControlService("algorand", "start");
}
if (voiStatus.ServiceStatus == "Running")
{
await Node.ControlService("voi", "start");
}

System.IO.File.Delete(filePath);

return Ok();
Expand Down
2 changes: 1 addition & 1 deletion create-package-deb.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rm -r Output

PKG=Output/func_3.2.2_linux-$1
PKG=Output/func_3.2.3_linux-$1

mkdir -p $PKG/lib/systemd/system
mkdir -p $PKG/opt/func
Expand Down
2 changes: 1 addition & 1 deletion create-package-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pkgbuild --root publish \
--install-location /opt/func \
--scripts pkg/scripts \
--identifier func.app \
Output/func_3.2.2_darwin-$1.pkg
Output/func_3.2.3_darwin-$1.pkg
2 changes: 1 addition & 1 deletion deb/amd64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 3.2.2
Version: 3.2.3
Section: base
Priority: optional
Architecture: amd64
Expand Down
2 changes: 1 addition & 1 deletion deb/arm64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 3.2.2
Version: 3.2.3
Section: base
Priority: optional
Architecture: arm64
Expand Down
2 changes: 1 addition & 1 deletion webui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "func-webui",
"version": "3.2.2",
"version": "3.2.3",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
26 changes: 0 additions & 26 deletions webui/src/components/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -487,30 +487,4 @@ function reloadPartDetails() {
partDetails.value = undefined;
store.refresh++;
}
let paused = false;
watch(
() => store.stopNodeServices,
async (val) => {
try {
if (val && nodeStatus.value?.serviceStatus === "Running") {
paused = true;
await FUNC.api.put(`${props.name}/stop`);
nodeStatus.value.serviceStatus = "Stopped";
algodStatus.value = undefined;
peers.value = undefined;
}
if (!val && paused) {
paused = false;
await FUNC.api.put(`${props.name}/start`);
await delay(500);
getNodeStatus();
}
} catch (err: any) {
console.error(err);
store.setSnackbar(err?.response?.data || err.message, "error");
}
}
);
</script>
2 changes: 0 additions & 2 deletions webui/src/components/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,12 @@ async function updateNodeLatest(bypass = false) {
async function updateNode(release: string) {
try {
store.downloading = true;
store.stopNodeServices = true;
await FUNC.api.post("goal/update", { name: release });
await getVersion();
} catch (err: any) {
console.error(err);
store.setSnackbar(err?.response?.data || err.message, "error");
}
store.stopNodeServices = false;
store.downloading = false;
}
Expand Down
1 change: 0 additions & 1 deletion webui/src/stores/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const useAppStore = defineStore("app", {
} as SnackBar,
refresh: 0,
connectMenu: false,
stopNodeServices: false,
funcUpdateAvailable: false,
nodeUpdateAvailable: false,
downloading: false,
Expand Down

0 comments on commit 07d73d0

Please sign in to comment.