Skip to content

Commit

Permalink
feat: Lint all RPM files before exiting due to failure
Browse files Browse the repository at this point in the history
  • Loading branch information
EyeCantCU committed Dec 22, 2023
1 parent cedae2e commit f47842d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rpmlint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ ARGUMENTS=$(echo "$ARGUMENTS" | xargs)

# Perform rpmlint on comma-separated list of files
if [[ -n "${RPMFILES}" ]]; then
RPMLINT_STATUS=0
RETURN_CODE=0
set -e
for FILE in $(echo "${RPMFILES}" | tr "," "\n"); do
rpmlint $ARGUMENTS $FILE
rpmlint $ARGUMENTS $FILE || RPMLINT_STATUS=$?
if [[ $RPMLINT_STATUS -ne 0 ]]; then
$RETURN_CODE=$RPMLINT_STATUS
fi
done
exit $RETURN_CODE
else
rpmlint $ARGUMENTS
fi

0 comments on commit f47842d

Please sign in to comment.