Skip to content

Commit

Permalink
fix: run go-licenses correctly with downloaded go
Browse files Browse the repository at this point in the history
If the go toolchain is downloaded due to installed version vs go.mod
then we need to set GOROOT for go-licenses to run correctly.

See: google/go-licenses#149
  • Loading branch information
dtrudg committed Aug 27, 2024
1 parent 5af8d7a commit 03fe47c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/update-license-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
set -e
set -u

go install github.com/google/[email protected]

if [ -d "vendor" ]; then
echo "Please remove vendor directory before running this script"
exit 255
Expand All @@ -16,4 +14,4 @@ if [ ! -f "go.mod" ]; then
exit 255
fi

go-licenses report ./... --ignore github.com/sylabs/singularity/v4 --template scripts/LICENSE_DEPENDENCIES.tpl > LICENSE_DEPENDENCIES.md
$(go env GOROOT)/bin/go run github.com/google/go-licenses@v1.6.0 report ./... --ignore github.com/sylabs/singularity/v4 --template scripts/LICENSE_DEPENDENCIES.tpl > LICENSE_DEPENDENCIES.md

0 comments on commit 03fe47c

Please sign in to comment.