Skip to content

Commit

Permalink
feat: add dev toolchain setup script
Browse files Browse the repository at this point in the history
Add toolchain.sh script to install and configure development dependencies
  • Loading branch information
a-hilaly committed Nov 9, 2024
1 parent 8bcb823 commit b4cb7c2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions hack/toolchain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -euo pipefail

K8S_VERSION="${K8S_VERSION:="1.29.x"}"
KUBEBUILDER_ASSETS="/usr/local/kubebuilder/bin"

main() {
tools
kubebuilder
}

tools() {
if ! echo "$PATH" | grep -q "${GOPATH:-undefined}/bin\|$HOME/go/bin"; then
echo "Go workspace's \"bin\" directory is not in PATH. Run 'export PATH=\"\$PATH:\${GOPATH:-\$HOME/go}/bin\"'."
fi

go install github.com/awslabs/attribution-gen@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install github.com/google/ko@latest
go install github.com/mikefarah/yq/v4@latest
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest
go install github.com/sigstore/cosign/v2/cmd/cosign@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
}

0 comments on commit b4cb7c2

Please sign in to comment.