Update checkThatTemplatesVersionWasChanged.sh

This commit is contained in:
Amit Bergman 2021-08-16 13:27:48 +03:00 коммит произвёл GitHub
Родитель 4827e23089
Коммит a2014c3b72
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 9 добавлений и 5 удалений

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

@ -1,9 +1,12 @@
#!/bin/bash
failed=0
filesThatWereChanged=$(echo $(git diff origin/master --name-only))
for file in $filesThatWereChanged
do
echo processing the file $file that was changed
#Going over all the files that were changed in this PR
#And making sure that in every file that its filename contains the word "Detection", the version was updated
do
echo processing the file $file that was changed
if [[ "$file" == *"Detection"* ]];
then
echo $file is a detection
@ -13,10 +16,11 @@ do
echo all good - the version was updated
else
echo you **did not** change the version in this file: $file
exit 1
failed=1
fi
else
echo $file is not a detection
fi
fi
done
exit $failed