update the update scripts

This commit is contained in:
Henry Dollman
2024-07-21 19:20:20 -04:00
parent 683032f919
commit 765a4c707b
2 changed files with 4 additions and 6 deletions

View File

@@ -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))
} }

View File

@@ -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))
} }