@@ -200,11 +200,13 @@ func (c *CLI) contentPushCmd() *cobra.Command {
200
200
filterRoots := determineFilterRoots (cmd )
201
201
excludePatterns := determineExcludePatterns (cmd )
202
202
clean , _ := cmd .Flags ().GetBool ("clean" )
203
+ filterMode := determineFilterMode (cmd )
203
204
if err = c .aem .ContentManager ().Push (instances , clean , pkg.PackageCreateOpts {
204
205
PID : fmt .Sprintf ("aemc:content-push:%s-SNAPSHOT" , timex .FileTimestampForNow ()),
205
206
FilterRoots : filterRoots ,
206
207
ExcludePatterns : excludePatterns ,
207
208
ContentPath : path ,
209
+ FilterMode : filterMode ,
208
210
}); err != nil {
209
211
c .Error (err )
210
212
return
@@ -222,6 +224,7 @@ func (c *CLI) contentPushCmd() *cobra.Command {
222
224
cmd .Flags ().StringP ("path" , "p" , "" , "JCR root path or local file path" )
223
225
cmd .MarkFlagsOneRequired ("dir" , "file" , "path" )
224
226
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" )
225
228
return cmd
226
229
}
227
230
@@ -370,3 +373,11 @@ func determineExcludePatterns(cmd *cobra.Command) []string {
370
373
}
371
374
return excludePatterns
372
375
}
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