Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UpgradeCmd = &cobra.Command{ Use: "upgrade [group]", Short: "upgrade a group of packages", Long: ` The "group upgrade" subcommand upgrades a group of packages. `, RunE: func(cmd *cobra.Command, args []string) error { if len(args) != 1 { cmd.Help() return errors.New("Expected a single package group name") } cfg, err := config.Load() if err != nil { return err } if utils.RecipeDirFlag == "" { for _, pkgRepo := range cfg.PkgRepos { shouldRefresh, err := pkgRepo.ShouldRefreshRecipes(cfg.RefreshInterval) if err != nil { return err } if shouldRefresh || doRefresh { color.HiBlue("Refreshing package recipes for %q...", pkgRepo.Name) if err = pkgRepo.RefreshRecipes(); err != nil { fmt.Println(err) } else { color.HiBlue("%s%sRefreshed package recipes!", multiline.MoveUp, multiline.ClearLine) } } } } group := args[0] return UpgradeGroup(cfg, group) }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.