mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 01:39:34 +08:00
fix update scripts
This commit is contained in:
@@ -16,7 +16,10 @@ func updateBeszel() {
|
|||||||
currentVersion := semver.MustParse(Version)
|
currentVersion := semver.MustParse(Version)
|
||||||
fmt.Println("beszel-agent", currentVersion)
|
fmt.Println("beszel-agent", currentVersion)
|
||||||
fmt.Println("Checking for updates...")
|
fmt.Println("Checking for updates...")
|
||||||
latest, found, err = selfupdate.DetectLatest("henrygd/beszel")
|
updater, _ := selfupdate.NewUpdater(selfupdate.Config{
|
||||||
|
Filters: []string{"beszel-agent"},
|
||||||
|
})
|
||||||
|
latest, found, err = updater.DetectLatest("henrygd/beszel")
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error checking for updates:", err)
|
fmt.Println("Error checking for updates:", err)
|
||||||
@@ -28,7 +31,7 @@ func updateBeszel() {
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Latest version", "v", latest.Version)
|
fmt.Println("Latest version:", latest.Version)
|
||||||
|
|
||||||
if latest.Version.LTE(currentVersion) {
|
if latest.Version.LTE(currentVersion) {
|
||||||
fmt.Println("You are up to date")
|
fmt.Println("You are up to date")
|
||||||
|
@@ -17,7 +17,10 @@ func updateBeszel(cmd *cobra.Command, args []string) {
|
|||||||
currentVersion := semver.MustParse(Version)
|
currentVersion := semver.MustParse(Version)
|
||||||
fmt.Println("beszel", currentVersion)
|
fmt.Println("beszel", currentVersion)
|
||||||
fmt.Println("Checking for updates...")
|
fmt.Println("Checking for updates...")
|
||||||
latest, found, err = selfupdate.DetectLatest("henrygd/beszel")
|
updater, _ := selfupdate.NewUpdater(selfupdate.Config{
|
||||||
|
Filters: []string{"beszel_"},
|
||||||
|
})
|
||||||
|
latest, found, err = updater.DetectLatest("henrygd/beszel")
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error checking for updates:", err)
|
fmt.Println("Error checking for updates:", err)
|
||||||
@@ -29,7 +32,7 @@ func updateBeszel(cmd *cobra.Command, args []string) {
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Latest version", "v", latest.Version)
|
fmt.Println("Latest version:", latest.Version)
|
||||||
|
|
||||||
if latest.Version.LTE(currentVersion) {
|
if latest.Version.LTE(currentVersion) {
|
||||||
fmt.Println("You are up to date")
|
fmt.Println("You are up to date")
|
||||||
|
Reference in New Issue
Block a user