Fix counting

This commit is contained in:
tusooa 2023-04-04 12:24:45 -04:00
parent 89a40b867d
commit 686c3e03bd
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224

View file

@ -1,14 +1,14 @@
#!/bin/sh #!/bin/sh
echo $CI_MERGE_REQUEST_IID echo "looking for change log of $CI_MERGE_REQUEST_IID"
ls changelog.d
count=0 count=0
for i in add remove fix security skip; do for i in add remove fix security skip; do
[ -f changelog.d/"$CI_MERGE_REQUEST_IID"."$i" ] [ -f changelog.d/"$CI_MERGE_REQUEST_IID"."$i" ]
retcode=$? retcode=$?
if [ $retcode -eq 0 ]; then if [ $retcode -eq 0 ]; then
echo "found $CI_MERGE_REQUEST_IID.$i" echo "found $CI_MERGE_REQUEST_IID.$i"
count=$(( count++ )) count=$(( count + 1 ))
else else
echo "no $CI_MERGE_REQUEST_IID.$i" echo "no $CI_MERGE_REQUEST_IID.$i"
fi fi