k3s/scripts/test-mods
Brad Davidson dd2f652618 Fix test-mods to allow for pinning version from k8s.io
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-11-03 15:32:41 -07:00

11 lines
281 B
Bash
Executable File

#!/bin/bash
set -e -x
res=$(go mod edit --json | jq -r '.Replace[] | select(.Old.Path | contains("k8s.io/")) | .New.Path' | grep -vE '^(k8s.io/|github.com/k3s-io/)' | wc -l)
if [ $res -gt 0 ];then
echo "Incorrect kubernetes replacement fork in go.mod"
exit 1
else
exit 0
fi