pleroma/tools/check-changelog
2023-04-04 16:20:46 +00:00

22 lines
472 B
Bash

#!/bin/sh
echo $CI_MERGE_REQUEST_IID
ls changelog.d
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++ ))
else
echo "no $CI_MERGE_REQUEST_IID.$i"
fi
done
if [ $count -gt 0 ]; then
echo "ok"
exit 0
else
echo "must have a changelog entry or explicitly skip it"
exit 1
fi