Annotate Version Line

This commit is contained in:
Roxedus 2022-07-21 22:35:53 +02:00
parent 39a4e158f8
commit 810ab47df1
No known key found for this signature in database
GPG key ID: EBC13557C4D91D7B

View file

@ -52,7 +52,8 @@ jobs:
VERSION_LINE_MISSING=$(find . -not -path '*/\.*' -type f -name '*.conf.sample' -exec grep -H -c -P '^## Version (?:19|20|21)[0-9]{2}/(?:(?:0[1-9]|1[0-2])/(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])/(?:30))|(?:(?:0[13578]|1[02])/31))$' {} \; | grep 0$ | cut -d':' -f1)
VERSION_LINE_MISSING_COUNT=$(echo "${VERSION_LINE_MISSING}" | wc -w)
if (( VERSION_LINE_MISSING_COUNT > 0 )); then
echo "The following files are missing the version date line or it is not formatted correctly (YYYY/MM/DD):"
echo "${VERSION_LINE_MISSING}"
for i in ${VERSION_LINE_MISSING}; do
echo "::error file=${i},line=1,title=Version Line::This file is missing the version date line or it is not formatted correctly (YYYY/MM/DD)"
done
exit 1
fi