-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
update.go
26 lines (22 loc) · 1.08 KB
/
update.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var updateCmd = &cobra.Command{
Use: "update",
Short: "Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations",
GroupID: "main",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(updateCmd).Standalone()
updateCmd.Flags().Bool("auto-update", false, "Run on auto-updates (e.g. before `brew install`). Skips some slower steps.")
updateCmd.Flags().Bool("debug", false, "Display a trace of all shell commands as they are executed.")
updateCmd.Flags().Bool("force", false, "Always do a slower, full update check (even if unnecessary).")
updateCmd.Flags().Bool("help", false, "Show this message.")
updateCmd.Flags().Bool("merge", false, "Use `git merge` to apply updates (rather than `git rebase`).")
updateCmd.Flags().Bool("quiet", false, "Make some output more quiet.")
updateCmd.Flags().Bool("verbose", false, "Print the directories checked and `git` operations performed.")
rootCmd.AddCommand(updateCmd)
}