-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop relying on -modfile to allow vendorization
The Makefile targets we use to build our tools rely on the `-modfile` flag of the `go build` command. Unfortunately, the golang build toolchain doesn't respect the vendor directory relative to the `go.mod` file specified by `-modfile`, and instead uses the vendor directory relative to the current working directory. Since each subdirectory in this repository that contains a `go.mod` file needs to have its own vendor directory in order to be built in vendorized scenarios, relying on `-modfile` doesn't work. The patch modifies the affected Makefile targets to instead change to the directory of the tool being built instead of using the `-modfile` flag. This makes vendorization possible in downstream environments. Finally, for consistency, we start building the kustomize tool in the same way as controller-gen, and golangci-lint.
- Loading branch information
Showing
2 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters