diff --git a/builder-base/scripts/install_go_licenses.sh b/builder-base/scripts/install_go_licenses.sh index 25f0b82a5..97aca90de 100755 --- a/builder-base/scripts/install_go_licenses.sh +++ b/builder-base/scripts/install_go_licenses.sh @@ -32,7 +32,11 @@ function install_go_licenses() { # with GOROOT pointed to /root/sdk/go... instead of /usr/local/go so it # is able to properly packages from the standard Go library # We currently use 1.19, 1.17 or 1.16, so installing for all - GO111MODULE=on GOBIN=${NEWROOT}/${GOPATH}/${GOLANG_MAJOR_VERSION}/bin go install github.com/google/go-licenses@$GO_LICENSES_VERSION + if [ "${GOLANG_MAJOR_VERSION}" = "go1.16" ]; then + GO111MODULE=on GOBIN=${NEWROOT}/${GOPATH}/${GOLANG_MAJOR_VERSION}/bin go install github.com/jaxesn/go-licenses@4497a2a38565e4e6ad095ea8117c25ecd622d0cc + else + GO111MODULE=on GOBIN=${NEWROOT}/${GOPATH}/${GOLANG_MAJOR_VERSION}/bin go install github.com/jaxesn/go-licenses@6800d77c11d0ef8628e7eda908b1d1149383ca48 + fi # symlink to go/bin and depending on which go-licenses vs is added last to # the final image, will take precedent and be the default