Merge pull request #1700 from grouville/global-cache-flags
Move cache flags to 'do' operation
This commit is contained in:
commit
c207b7e3a9
@ -158,6 +158,11 @@ func doHelp(cmd *cobra.Command, _ []string) {
|
|||||||
func init() {
|
func init() {
|
||||||
doCmd.Flags().StringArrayP("with", "w", []string{}, "")
|
doCmd.Flags().StringArrayP("with", "w", []string{}, "")
|
||||||
doCmd.Flags().StringP("plan", "p", ".", "Path to plan (defaults to current directory)")
|
doCmd.Flags().StringP("plan", "p", ".", "Path to plan (defaults to current directory)")
|
||||||
|
doCmd.Flags().Bool("no-cache", false, "Disable caching")
|
||||||
|
doCmd.Flags().StringArray("cache-to", []string{},
|
||||||
|
"Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)")
|
||||||
|
doCmd.Flags().StringArray("cache-from", []string{},
|
||||||
|
"External cache sources (eg. user/app:cache, type=local,src=path/to/dir)")
|
||||||
|
|
||||||
doCmd.SetHelpFunc(doHelp)
|
doCmd.SetHelpFunc(doHelp)
|
||||||
|
|
||||||
|
@ -24,12 +24,6 @@ func init() {
|
|||||||
rootCmd.PersistentFlags().String("log-format", "auto", "Log format (auto, plain, tty, json)")
|
rootCmd.PersistentFlags().String("log-format", "auto", "Log format (auto, plain, tty, json)")
|
||||||
rootCmd.PersistentFlags().StringP("log-level", "l", "info", "Log level")
|
rootCmd.PersistentFlags().StringP("log-level", "l", "info", "Log level")
|
||||||
|
|
||||||
rootCmd.PersistentFlags().Bool("no-cache", false, "Disable caching")
|
|
||||||
rootCmd.PersistentFlags().StringArray("cache-to", []string{},
|
|
||||||
"Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)")
|
|
||||||
rootCmd.PersistentFlags().StringArray("cache-from", []string{},
|
|
||||||
"External cache sources (eg. user/app:cache, type=local,src=path/to/dir)")
|
|
||||||
|
|
||||||
rootCmd.PersistentPreRun = func(cmd *cobra.Command, _ []string) {
|
rootCmd.PersistentPreRun = func(cmd *cobra.Command, _ []string) {
|
||||||
go checkVersion()
|
go checkVersion()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user