mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
cleanup vendoring of test deps
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
parent
58d6919183
commit
8ef7aaf885
1 changed files with 6 additions and 12 deletions
|
@ -88,24 +88,18 @@ clean() {
|
|||
|
||||
echo -n 'collecting import graph, '
|
||||
local IFS=$'\n'
|
||||
packages+=( $(
|
||||
for platform in "${dockerPlatforms[@]}"; do
|
||||
export GOOS="${platform%/*}";
|
||||
export GOARCH="${platform##*/}";
|
||||
for buildTags in "${buildTagCombos[@]}"; do
|
||||
go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}"
|
||||
done
|
||||
done | grep -E "^${PROJECT}" | grep -vE "^${PROJECT}/vendor" | sort -u
|
||||
) )
|
||||
local imports=( $(
|
||||
for platform in "${dockerPlatforms[@]}"; do
|
||||
export GOOS="${platform%/*}";
|
||||
export GOARCH="${platform##*/}";
|
||||
for buildTags in "${buildTagCombos[@]}"; do
|
||||
go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}"
|
||||
go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${packages[@]}"
|
||||
pkgs=( $(go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}" | grep -E "^${PROJECT}" | grep -vE "^${PROJECT}/vendor" | sort -u) )
|
||||
pkgs+=( ${packages[@]} )
|
||||
testImports=( $(go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${pkgs[@]}" | sort -u) )
|
||||
printf '%s\n' "${testImports[@]}"
|
||||
go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]} ${testImports[@]}"
|
||||
done
|
||||
done | grep -vE '^${PROJECT}' | sort -u
|
||||
done | grep -vE "^${PROJECT}" | sort -u
|
||||
) )
|
||||
imports=( $(go list -e -f '{{if not .Standard}}{{.ImportPath}}{{end}}' "${imports[@]}") )
|
||||
unset IFS
|
||||
|
|
Loading…
Reference in a new issue