Move cache flags to 'do' operation
Move cache flags to 'dagger do' as it will only become relevant for this dagger command Signed-off-by: guillaume <guillaume.derouville@gmail.com>
This commit is contained in:
parent
05cc2adec5
commit
8c54935349
@ -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