Fix the dirname command in macOS does not have a -z option

This commit is contained in:
carlory
2024-03-10 23:44:10 +08:00
parent 8f80e01467
commit 56da06b6dd

View File

@@ -35,6 +35,7 @@ cd "${KUBE_ROOT}"
# Ensure all modules are included in go.work
go work edit -use .
git ls-files -z ':(glob)./staging/src/k8s.io/*/go.mod' \
| xargs -0 -n1 dirname -z \
| xargs -0 -n1 dirname \
| tr '\n' '\0' \
| xargs -0 -n1 go work edit -use
go mod download # generate go.work.sum