Skip to content

Commit 957ef67

Browse files
committed
chore: stop pinning mock-kubeapiserver, format each go.mod
Pinning mock-kubeapiserver feels like it can be better done through use of versions. Formatting each go module to force more determinism.
1 parent cf8082c commit 957ef67

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

dev/format-gomod

+7-5
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ set -o pipefail
2525
REPO_ROOT=$(git rev-parse --show-toplevel)
2626
cd "${REPO_ROOT}"
2727

28-
# Print the go version
28+
# Print the go version for diagnostics
2929
go version
3030

3131
# Updates the go.mod in each go module
3232
# Note: go work sync is not entirely deterministic; I had to clear my modcache with `go clean -cache -modcache`
3333
go work sync
3434

35-
# Pin mockkubeapiserver an older version of kube, so mockkubeapiserver can be used from repos that aren't on the latest kube
36-
cd ${REPO_ROOT}/mockkubeapiserver
37-
go get k8s.io/[email protected]
38-
go get k8s.io/[email protected]
35+
# Tidy each individual go.mod
36+
for gomod_file in $(find "${REPO_ROOT}" -name "go.mod"); do
37+
dir=$(dirname ${gomod_file})
38+
cd "${dir}"
39+
go mod tidy
40+
done

0 commit comments

Comments
 (0)