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
echo $CI_MERGE_REQUEST_IID
ls changelog.d
echo "looking for change log of $CI_MERGE_REQUEST_IID"
count=0
for i in add remove fix security skip; do
[ -f changelog.d/"$CI_MERGE_REQUEST_IID"."$i" ]
retcode=$?
if [ $retcode -eq 0 ]; then
echo "found $CI_MERGE_REQUEST_IID.$i"
count=$(( count++ ))
count=$(( count + 1 ))
else
echo "no $CI_MERGE_REQUEST_IID.$i"
fi