wildfly / wildfly-operator

Kubernetes Operator for WildFly
http://docs.wildfly.org/wildfly-operator/
Apache License 2.0
32 stars 39 forks source link

Replace `go get` with `go install` to download and install requiring building tools #240

Closed yersan closed 1 year ago

yersan commented 2 years ago

There are several targets at the make file that automatically download and install the required tools if they are not yet available locally. For example, the following tools are automatically downloaded and installed when required by the make target:

They are downloaded and installed by calling go-get-tool, which is just a function that uses the go get in an empty module to make the trick to get them installed.

This go get has been deprecated since go 1.17 and removed and replaced by go install in go 1.19.

The task here is to replace how we are installing the building tools with go install command. These tools should be installed atn the project bin directory, for example, something like this could work to install the controller-gen:

GOBIN=$(pwd)/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.0