Skip to content

Commit 7e0ec84

Browse files
moved updater code into setup/updater
1 parent b5c763e commit 7e0ec84

5 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/core/loader/loader.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/managers/backupmgr"
1212
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/managers/detectionmgr"
1313
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/setup"
14+
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/setup/update"
1415
)
1516

1617
// only call this once at startup
@@ -74,7 +75,7 @@ func InitDetector() {
7475
}
7576

7677
func RestartBackend() {
77-
setup.RestartMySelf()
78+
update.RestartMySelf()
7879
}
7980

8081
func ReloadLocalizer() {

src/setup/install.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616

1717
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/config"
1818
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/logger"
19+
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/setup/update"
1920
)
2021

2122
var downloadBranch string // Holds the branch to download from
@@ -25,7 +26,7 @@ func Install(wg *sync.WaitGroup) {
2526
defer wg.Done() // Signal that installation is complete
2627

2728
// Step 0: Check for updates
28-
if err := UpdateExecutable(); err != nil {
29+
if err := update.UpdateExecutable(); err != nil {
2930
logger.Install.Error("❌Update check went sideways: " + err.Error())
3031
}
3132

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//go:build linux
22

3-
package setup
3+
package update
44

55
import (
66
"os/exec"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//go:build windows
22

3-
package setup
3+
package update
44

55
import (
66
"os/exec"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package setup
1+
package update
22

33
import (
44
"encoding/json"

0 commit comments

Comments
 (0)