Skip to content

Commit

Permalink
fix verify-dep target
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Valdes <[email protected]>
  • Loading branch information
ivanvc committed Aug 10, 2024
1 parent 7e5dd65 commit 0cd6df5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -531,15 +531,11 @@ function dump_deps_of_module() {
for module in "${modules[@]}"; do
local module_file
local module_name
local module_deps
module_file="${module/.../go.mod}"
if ! module_name=$(go mod edit -json "$module_file" | jq -r '.Module.Path'); then
return 255
fi
mapfile -t module_deps < <(go mod edit -json "$module_file" | jq -r '.Require[] | .Path+","+.Version+","+if .Indirect then " (indirect)" else "" end+",'"${module_name}"'"')
go mod edit -json "$module_file" | jq -r '.Require[] | .Path+","+.Version+","+if .Indirect then " (indirect)" else "" end+",'"${module_name}"'"' >> depsl.txt
echo "${module_deps[@]}" > deps.txt
deps+=("${module_deps[@]}")
while IFS= read -r line; do deps+=("$line"); done < <(go mod edit -json "$module_file" | jq -r '.Require[] | .Path+","+.Version+","+if .Indirect then " (indirect)" else "" end+",'"${module_name}"'"')
done
echo "${deps[@]}"
}
Expand Down

0 comments on commit 0cd6df5

Please sign in to comment.