-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1454 from camilamacedo86/clean-imports
Clean the GO mod files by removing the unnecessary indirect imports
- Loading branch information
Showing
4 changed files
with
133 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,13 @@ | |
export GOPROXY?=https://proxy.golang.org/ | ||
CONTROLLER_GEN_BIN_PATH := $(shell which controller-gen) | ||
|
||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) | ||
ifeq (,$(shell go env GOBIN)) | ||
GOBIN=$(shell go env GOPATH)/bin | ||
else | ||
GOBIN=$(shell go env GOBIN) | ||
endif | ||
|
||
##@ General | ||
|
||
# The help will print out all targets with their descriptions organized bellow their categories. The categories are represented by `##@` and the target descriptions by `##`. | ||
|
@@ -45,7 +52,9 @@ install: ## Build and install the binary with the current source code. Use it to | |
|
||
.PHONY: generate | ||
generate: ## Update/generate all mock data. You should run this commands to update the mock data after your changes. | ||
make generate-setup | ||
# If exists, rremove the controller-gen installed locally. It ensures that the version which will be used | ||
# is the version defined in the Makefile scaffolded. | ||
- rm -rf $(CONTROLLER_GEN_BIN_PATH) | ||
make generate-testdata | ||
go mod tidy | ||
|
||
|
@@ -57,11 +66,6 @@ generate-testdata: ## Update/generate the testdata in $GOPATH/src/sigs.k8s.io/ku | |
generate-vendor: ## (Deprecated) Update/generate the vendor by using the path $GOPATH/src/sigs.k8s.io/kubebuilder-test | ||
GO111MODULE=off ./generate_vendor.sh | ||
|
||
.PHONY: generate-setup | ||
generate-setup: ## Current workarround to generate the testdata with the correct controller-gen version | ||
- rm -rf $(CONTROLLER_GEN_BIN_PATH) | ||
- GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/[email protected] | ||
|
||
.PHONY: lint | ||
lint: ## Run code lint checks | ||
./scripts/verify.sh | ||
|
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
Oops, something went wrong.