fedora-comps/ci/validate-comps
Adam Williamson 40d2fd12bb validate-comps: don't set -x any more
This is only really useful for debugging the script itself, it's
not useful information for typical execution (especially now I
made it show which test(s) fail more clearly).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-04-24 11:07:30 -07:00

29 lines
508 B
Bash
Executable File

#!/usr/bin/bash
set -euo pipefail
main() {
failure=0
make sort > /dev/null 2>&1 || {
echo "Sort failed!"
((failure+=1))
}
make validate || {
echo "Validate failed!"
((failure+=1))
}
# Fail if any changes were made to the repo
if [[ -n $(git status --short) ]]; then
echo "git status failed!"
((failure+=1))
fi
if [[ $failure -gt 0 ]]; then
echo "${failure} check(s) failed!"
exit 1
fi
}
main "${@}"