Skip to content

Commit 051e47a

Browse files
authored
Merge pull request #413 from docker/refactor/pass
feat: replace hardcoded list of modules for linting with "go list" call
2 parents 780924b + b7ddf6e commit 051e47a

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

Dockerfile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,9 @@ RUN --mount=type=bind,target=.,ro \
6565
git config --global --add url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "git@github.com:"
6666
fi
6767

68-
(cd client && go mod tidy --diff)
69-
(cd cmd/engine && go mod tidy --diff)
70-
(cd cmd/nri-plugin && go mod tidy --diff)
71-
(cd cmd/pass && go mod tidy --diff)
72-
(cd engine && go mod tidy --diff)
73-
(cd injector && go mod tidy --diff)
74-
(cd pass && go mod tidy --diff)
75-
(cd plugin && go mod tidy --diff)
76-
(cd plugins/credentialhelper && go mod tidy --diff)
77-
(cd store && go mod tidy --diff)
78-
(cd x && go mod tidy --diff)
68+
for dir in $(go list -f '{{.Dir}}' -m); do
69+
(cd "$dir" && go mod tidy --diff)
70+
done
7971
EOT
8072
RUN --mount=type=bind,target=.,ro \
8173
--mount=type=cache,target=/root/.cache <<EOT

0 commit comments

Comments
 (0)