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 13d1a13
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
RETURN_CODE="0"
set -e
for FILE in $(echo "${RPMFILES}" | tr "," "\n"); do
rpmlint $ARGUMENTS $FILE
rpmlint "$ARGUMENTS" "$FILE"
if [[ "$?" != "0" ]]; then
RETURN_CODE="1"
fi
done
set +e
exit "$RETURN_CODE"
else
rpmlint $ARGUMENTS
fi

0 comments on commit 13d1a13

Please sign in to comment.