()
| 19 | } |
| 20 | |
| 21 | func pushCmd() *cobra.Command { |
| 22 | flags := pushCmdFlags{} |
| 23 | cmd := &cobra.Command{ |
| 24 | Use: "push <git-repo>", |
| 25 | Short: "Push a [global] config. Leave empty to use jetify cloud. Can " + |
| 26 | "be a git repo for self storage.", |
| 27 | Args: cobra.MaximumNArgs(1), |
| 28 | RunE: func(cmd *cobra.Command, args []string) error { |
| 29 | return pushCmdFunc(cmd, goutil.GetDefaulted(args, 0), flags) |
| 30 | }, |
| 31 | } |
| 32 | |
| 33 | flags.config.register(cmd) |
| 34 | |
| 35 | return cmd |
| 36 | } |
| 37 | |
| 38 | func pushCmdFunc(cmd *cobra.Command, url string, flags pushCmdFlags) error { |
| 39 | box, err := devbox.Open(&devopt.Opts{ |
no test coverage detected