Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-get-tool should install to $1 instead of $PROJECT_DIR/bin #431

Closed
tthvo opened this issue Jul 22, 2022 · 6 comments · Fixed by #430
Closed

go-get-tool should install to $1 instead of $PROJECT_DIR/bin #431

tthvo opened this issue Jul 22, 2022 · 6 comments · Fixed by #430
Labels
bug Something isn't working

Comments

@tthvo
Copy link
Member

tthvo commented Jul 22, 2022

go-get-tool will 'go get' any package $2 and install it to $1.

go-get-tool defined in Makefile said to install the path specified in $1 but eventually installs to $PROJECT_DIR/bin anyaway.

GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\

@tthvo tthvo added the bug Something isn't working label Jul 22, 2022
@tthvo
Copy link
Member Author

tthvo commented Jul 22, 2022

Also should we use go install instead of go get as it is deprecated?

Any thoughts @ebaron @andrewazores?

@tthvo
Copy link
Member Author

tthvo commented Jul 22, 2022

Trying to reuse this method to fetch setup-envtest since new updates in controller-runtime 0.10.0 removes hack/setup-envtest.sh so this

https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.10.0/hack/setup-envtest.sh

is not valid anymore.

See #430

@ebaron
Copy link
Member

ebaron commented Jul 22, 2022

Also should we use go install instead of go get as it is deprecated?

I think so. This would be required in order to work with Golang >= 1.18. Ideally, this would also work with 1.16, which I think it does.

@ebaron
Copy link
Member

ebaron commented Jul 22, 2022

Trying to reuse this method to fetch setup-envtest binary since new updates in controller-runtime 0.10.0 removes hack/setup-envtest.sh so this

https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.10.0/hack/setup-envtest.sh

is not valid anymore.

See #430

Something that may be useful is the Operator SDK's project in their testdata. This shows what the boilerplate looks like when generated by the newest SDK:
https://github.com/operator-framework/operator-sdk/tree/master/testdata/go/v3/memcached-operator

@tthvo
Copy link
Member Author

tthvo commented Jul 22, 2022

Right! I will try going with their way for setting up env-test and use go install while upgrading sdk (will ref this issue there). Thanks @ebaron

@ebaron
Copy link
Member

ebaron commented Jul 22, 2022

Sounds good, you can also change the tag to different SDK releases if you want to see what the Makefile looks like for a particular release, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants