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

Always use correct tool version #13

Merged
merged 1 commit into from
Aug 19, 2021
Merged

Conversation

scothis
Copy link
Contributor

@scothis scothis commented Aug 18, 2021

Use go dependency management to download and run common build tools like
controller-gen, ginkgo and kustomize. This will ensure that the correct
version of the tool is used. As a bonus, we can use tools like
dependabot to automatically track and propose updated to our tools.

Under the hood this works by using a custom go module with a single
dependency (the tool). go run is used to load and execute the tool at
runtime for that module. Golang caches the compiled version of the tool
and invalidates the cache when a new version of the tool is desired.

This PR does not change how envtest is setup, which is a bit more
complicated.

This PR also aligns the module name with the git repo.

Signed-off-by: Scott Andrews andrewssc@vmware.com

Use go dependency management to download and run common build tools like
controller-gen, ginkgo and kustomize. This will ensure that the correct
version of the tool is used. As a bonus, we can use tools like
dependabot to automatically track and propose updated to our tools.

Under the hood this works by using a custom go module with a single
dependency (the tool). `go run` is used to load and execute the tool at
runtime for that module. Golang caches the compiled version of the tool
and invalidates the cache when a new version of the tool is desired.

This PR does not change how envtest is setup, which is a bit more
complicated.

This PR also aligns the module name with the git repo.

Signed-off-by: Scott Andrews <andrewssc@vmware.com>
@scothis scothis requested a review from a team August 18, 2021 21:39
Copy link
Member

@baijum baijum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@baijum baijum merged commit ff2d31c into servicebinding:main Aug 19, 2021
@scothis scothis deleted the version-tools branch August 19, 2021 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants