Skip to content

Commit

Permalink
hack verify.sh: clean up "base"
Browse files Browse the repository at this point in the history
This is a follow-up for commit beb51e1 ("make verify: run checks in
all module hack directories"). Removing "/go.mod" from the module
variable is no longer necessary, so drop the base variable entirely.
Use PWD in run-checks to record failing verification scripts instead
of base.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
  • Loading branch information
skitt committed Sep 30, 2024
1 parent 4aeaf1e commit 1e5d228
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hack/make-rules/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function run-checks {
else
echo -e "${color_red}FAILED${color_norm} ${check_name}\t${elapsed}s"
ret=1
FAILED_TESTS+=("${base}/${t}")
FAILED_TESTS+=("${PWD}/${t}")
fi
done
}
Expand Down Expand Up @@ -234,10 +234,9 @@ ret=0
modules=() # Pacify shellcheck
kube::util::read-array modules < <(go list -f '{{.Dir}}' -m)
for module in "${modules[@]}"; do
base=${module%/go.mod}
if [ -d "$base/hack" ]; then
kube::util::run-in "$base" run-checks "hack/verify-*.sh" bash
kube::util::run-in "$base" run-checks "hack/verify-*.py" python3
if [ -d "$module/hack" ]; then
kube::util::run-in "$module" run-checks "hack/verify-*.sh" bash
kube::util::run-in "$module" run-checks "hack/verify-*.py" python3
fi
done
missing-target-checks
Expand Down

0 comments on commit 1e5d228

Please sign in to comment.