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 2d28dc2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 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="$?" || true
if [[ "$RPMLINT_STATUS" != "0" ]]; then
RETURN_CODE="RPMLNT_STATUS"
fi
done
exit "$RETURN_CODE"
else
rpmlint $ARGUMENTS
fi

0 comments on commit 2d28dc2

Please sign in to comment.