mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 01:39:34 +08:00
add update command
This commit is contained in:
8
main.go
8
main.go
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/pocketbase/pocketbase/plugins/migratecmd"
|
||||
"github.com/pocketbase/pocketbase/tools/cron"
|
||||
"github.com/pocketbase/pocketbase/tools/mailer"
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
||||
@@ -43,6 +44,13 @@ func main() {
|
||||
app.RootCmd.Use = "beszel"
|
||||
app.RootCmd.Short = ""
|
||||
|
||||
// add update command
|
||||
app.RootCmd.AddCommand(&cobra.Command{
|
||||
Use: "update",
|
||||
Short: "Update beszel to the latest version",
|
||||
Run: updateBeszel,
|
||||
})
|
||||
|
||||
// loosely check if it was executed using "go run"
|
||||
isGoRun := strings.HasPrefix(os.Args[0], os.TempDir())
|
||||
|
||||
|
Reference in New Issue
Block a user