mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 01:39:34 +08:00
update the update scripts
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -37,7 +36,7 @@ func updateBeszel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var binaryPath string
|
var binaryPath string
|
||||||
fmt.Printf("Updating from %s to %s...", currentVersion, latest.Version)
|
fmt.Printf("Updating from %s to %s...\n", currentVersion, latest.Version)
|
||||||
binaryPath, err = os.Executable()
|
binaryPath, err = os.Executable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error getting binary path:", err)
|
fmt.Println("Error getting binary path:", err)
|
||||||
@@ -48,5 +47,5 @@ func updateBeszel() {
|
|||||||
fmt.Println("Please try rerunning with sudo. Error:", err)
|
fmt.Println("Please try rerunning with sudo. Error:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
log.Printf("Successfully updated: %s -> %s\n\n%s", currentVersion, latest.Version, strings.TrimSpace(latest.ReleaseNotes))
|
fmt.Printf("Successfully updated to %s\n\n%s\n", latest.Version, strings.TrimSpace(latest.ReleaseNotes))
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ func updateBeszel(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var binaryPath string
|
var binaryPath string
|
||||||
fmt.Printf("Updating from %s to %s...", currentVersion, latest.Version)
|
fmt.Printf("Updating from %s to %s...\n", currentVersion, latest.Version)
|
||||||
binaryPath, err = os.Executable()
|
binaryPath, err = os.Executable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error getting binary path:", err)
|
fmt.Println("Error getting binary path:", err)
|
||||||
@@ -49,5 +48,5 @@ func updateBeszel(cmd *cobra.Command, args []string) {
|
|||||||
fmt.Println("Please try rerunning with sudo. Error:", err)
|
fmt.Println("Please try rerunning with sudo. Error:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
log.Printf("Successfully updated: %s -> %s\n\n%s", currentVersion, latest.Version, strings.TrimSpace(latest.ReleaseNotes))
|
fmt.Printf("Successfully updated to %s\n\n%s\n", latest.Version, strings.TrimSpace(latest.ReleaseNotes))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user