Skip to content

Commit e4fafbb

Browse files
author
Dominik Przybyl
committed
refactor update property, renamed to filter-mode property
1 parent dcaac90 commit e4fafbb

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

cmd/aem/content.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func (c *CLI) contentPushCmd() *cobra.Command {
200200
filterRoots := determineFilterRoots(cmd)
201201
filterRootExcludes := determineFilterRootExcludes(cmd)
202202
clean, _ := cmd.Flags().GetBool("clean")
203-
filterMode := determineFilterMode(cmd)
203+
filterMode, _ := cmd.Flags().GetString("filter-mode")
204204
if err = c.aem.ContentManager().Push(instances, clean, pkg.PackageCreateOpts{
205205
PID: fmt.Sprintf("aemc:content-push:%s-SNAPSHOT", timex.FileTimestampForNow()),
206206
FilterRoots: filterRoots,
@@ -224,7 +224,7 @@ func (c *CLI) contentPushCmd() *cobra.Command {
224224
cmd.Flags().StringP("path", "p", "", "JCR root path or local file path")
225225
cmd.MarkFlagsOneRequired("dir", "file", "path")
226226
cmd.Flags().Bool("clean", false, "Normalize content while uploading")
227-
cmd.Flags().Bool("update", false, "Existing content on running instance is updated, new content is added and none is deleted")
227+
cmd.Flags().String("filter-mode", "", "Override default filter model")
228228
return cmd
229229
}
230230

@@ -373,11 +373,3 @@ func determineFilterRootExcludes(cmd *cobra.Command) []string {
373373
}
374374
return filterRootExcludes
375375
}
376-
377-
func determineFilterMode(cmd *cobra.Command) string {
378-
update, _ := cmd.Flags().GetBool("update")
379-
if update {
380-
return "update"
381-
}
382-
return ""
383-
}

0 commit comments

Comments
 (0)