@@ -10,7 +10,6 @@ import (
1010 clientutils "github.com/jfrog/jfrog-client-go/utils"
1111 "github.com/jfrog/jfrog-client-go/utils/errorutils"
1212 "github.com/jfrog/jfrog-client-go/utils/io/fileutils"
13- "github.com/jfrog/jfrog-client-go/utils/log"
1413)
1514
1615type SpecFiles struct {
@@ -153,7 +152,7 @@ func ValidateSpec(files []File, isTargetMandatory, isSearchBasedSpec, isUpload b
153152 if len (files ) == 0 {
154153 return errors .New ("Spec must include at least one file group" )
155154 }
156- propsUsedInUpload := false
155+
157156 for _ , file := range files {
158157 isAql := len (file .Aql .ItemsFind ) > 0
159158 isPattern := len (file .Pattern ) > 0
@@ -168,7 +167,6 @@ func ValidateSpec(files []File, isTargetMandatory, isSearchBasedSpec, isUpload b
168167 isOffset := file .Offset > 0
169168 isLimit := file .Limit > 0
170169 isValidSortOrder := file .SortOrder == "asc" || file .SortOrder == "desc"
171- propsUsedInUpload = propsUsedInUpload || (isUpload && len (file .Props ) > 0 )
172170 isExcludeProps := len (file .ExcludeProps ) > 0
173171 isArchive := len (file .Archive ) > 0
174172 isValidArchive := file .Archive == "zip"
@@ -234,17 +232,9 @@ func ValidateSpec(files []File, isTargetMandatory, isSearchBasedSpec, isUpload b
234232 return errors .New ("The value of 'archive' (if provided) must be 'zip'." )
235233 }
236234 }
237- if propsUsedInUpload {
238- showDeprecationOnProps ()
239- }
240235 return nil
241236}
242237
243238func fileSpecValidationError (fieldA , fieldB string ) error {
244239 return errors .New (fmt .Sprintf ("Spec cannot include both '%s' and '%s.'" , fieldA , fieldB ))
245240}
246-
247- func showDeprecationOnProps () {
248- log .Warn (`The --props command option and the 'Props' File Spec property are deprecated in Upload.
249- Please use the --target-props command option or the 'targetProps' File Spec property instead.` )
250- }
0 commit comments