Skip to content

Commit

Permalink
Add workaround for dependency license scan. (#1605)
Browse files Browse the repository at this point in the history
  • Loading branch information
runewake2 committed Mar 24, 2021
1 parent 5bafd6a commit 9a46cb9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/create-licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ for PACKAGE in $(go list -m -json all | jq -r .Path | sort -f); do
# echo "$PACKAGE doesn't exist in vendor, skipping" > /dev/stderr
continue
fi
# TODO: samwronski - remove this edge case
# The above if statement skips dependencies which did not get checked out with
# `go mod vendor` however that does not catch this edge case.
# Kpt currently depends on 2 versions of posener. Because v2 *is* checked out
# the directory does exist causing the above check to pass. However this repo
# is not included in the vendor directory so a license will not be found.
if [[ ! -e "github.com/posener/complete" ]]; then
continue
fi

process_content "${PACKAGE}" LICENSE
process_content "${PACKAGE}" COPYRIGHT
Expand Down

0 comments on commit 9a46cb9

Please sign in to comment.