mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 10:46:16 +01:00
move update functions to agent / hub packages
This commit is contained in:
@@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"beszel"
|
||||
"beszel/internal/agent"
|
||||
"beszel/internal/update"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
@@ -17,7 +16,7 @@ func main() {
|
||||
case "-v":
|
||||
fmt.Println(beszel.AppName+"-agent", beszel.Version)
|
||||
case "update":
|
||||
update.UpdateBeszelAgent()
|
||||
agent.Update()
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"beszel"
|
||||
"beszel/internal/hub"
|
||||
"beszel/internal/update"
|
||||
_ "beszel/migrations"
|
||||
|
||||
"github.com/pocketbase/pocketbase"
|
||||
@@ -22,7 +21,7 @@ func main() {
|
||||
app.RootCmd.AddCommand(&cobra.Command{
|
||||
Use: "update",
|
||||
Short: "Update " + beszel.AppName + " to the latest version",
|
||||
Run: func(_ *cobra.Command, _ []string) { update.UpdateBeszel() },
|
||||
Run: hub.Update,
|
||||
})
|
||||
|
||||
hub.NewHub(app).Run()
|
||||
|
||||
Reference in New Issue
Block a user