updated the analytic rule version update logic

This commit is contained in:
mkchiliveri 2022-11-10 14:33:31 +05:30
Родитель fb3051ea4a
Коммит 2d75f6c204
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -7,7 +7,7 @@ for (( i=0; i<${#MAPFILE[@]}; i++ ))
#And making sure that in every file that its filename contains the word "Detection", the version was updated
do
echo processing the file ${MAPFILE[$i]}.
if [[ "${MAPFILE[$i]}" == *"Detections/"* || "${MAPFILE[$i]}" == *"Analytic Rules/"* ]] && [[ "${file: -5}" == *".yaml"* || "${file: -4}" == *".yml"* ]];
if [[ "${MAPFILE[$i]}" == *"Detections/"* || "${MAPFILE[$i]}" == *"Analytic Rules/"* ]] && [[ "${MAPFILE[$i]: -5}" == *".yaml"* || "${MAPFILE[$i]: -4}" == *".yml"* ]];
then
echo ${MAPFILE[$i]} is a detection
diffs=$(echo $(git diff origin/master -U0 --ignore-space-change "${MAPFILE[$i]}"))