From f6e8f18a9a89d5345c048f91551878ef5023ebf3 Mon Sep 17 00:00:00 2001 From: XGQT Date: Sun, 12 Apr 2020 14:26:58 +0200 Subject: [PATCH] check-commit: fix the exit status should work this time... --- src/check-commit | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/check-commit b/src/check-commit index 66a8cbb..80ebe20 100755 --- a/src/check-commit +++ b/src/check-commit @@ -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