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 b6aa680
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rpmlint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ ARGUMENTS=$(echo "$ARGUMENTS" | xargs)

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

0 comments on commit b6aa680

Please sign in to comment.