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 63a8f73
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions rpmlint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,19 @@ ARGUMENTS=$(echo "$ARGUMENTS" | xargs)

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

0 comments on commit 63a8f73

Please sign in to comment.