Skip to content

Commit

Permalink
manually install golicense from the last release (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzneal authored Apr 11, 2022
1 parent c4b2e7b commit c115db3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions hack/toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ KUBEBUILDER_ASSETS="${KUBEBUILDER_ASSETS:="${HOME}/.kubebuilder/bin"}"

main() {
tools
golicense
kubebuilder
}

tools() {
go install github.com/mitchellh/[email protected]
go install github.com/fzipp/gocyclo/cmd/[email protected]
go install github.com/golangci/golangci-lint/cmd/[email protected]
go install github.com/google/[email protected]
go install github.com/mikefarah/yq/[email protected]
go install github.com/mitchellh/[email protected]
go install github.com/norwoodj/helm-docs/cmd/[email protected]
go install github.com/onsi/ginkgo/[email protected]
go install sigs.k8s.io/controller-runtime/tools/[email protected]
Expand All @@ -39,4 +38,16 @@ kubebuilder() {
find $KUBEBUILDER_ASSETS
}

golicense() {
# golicense no longer builds with go 1.18+, for now just install the last release binary
if [[ $(go env GOOS) == "darwin" ]]; then
curl -SLl https://github.com/mitchellh/golicense/releases/download/v0.2.0/golicense_0.2.0_macos_x86_64.tar.gz | tar -C /tmp -zx
else
curl -SLl https://github.com/mitchellh/golicense/releases/download/v0.2.0/golicense_0.2.0_linux_x86_64.tar.gz | tar -C /tmp -zx
fi
if [ -d "${HOME}/go/bin" ]; then
mv /tmp/golicense "${HOME}/go/bin"
fi
}

main "$@"

0 comments on commit c115db3

Please sign in to comment.