check-commit: fix the exit status

should work this time...
This commit is contained in:
XGQT 2020-04-12 14:26:58 +02:00
parent ff33690e75
commit f6e8f18a9a
No known key found for this signature in database
GPG Key ID: 2089DEC77862433A

View File

@ -21,18 +21,20 @@ fi
# First test for a whole repo
# This will likely exit firh error, because repoman
# has to download some files ( metadata.xsd)
# has to download some files (metadata.xsd)
# We do that so we can truthfully test the actual latest commit
echo ">>> Starting full test"
repoman -Idix
pkgcheck scan
echo ">>> Starting latest commit test"
test_success=true
# Use pkgchek
pkgcheck scan --commits || test_success=false
# Iterate through changed files in last commit
# For each of these use dirname to change directory
# to the one where the changed file resides
@ -51,4 +53,10 @@ do
done
# If any of the QA tools fail the test will fail
[ ${test_success} = false ] && ( echo "Exiting with failure due to previous errors..."; exit 1 )
if [ ${test_success} = false ]
then
echo ">>> Exiting with failure due to previous errors..."
exit 1
else
exit 0
fi