Skip to content

Commit

Permalink
Merge pull request #1454 from camilamacedo86/clean-imports
Browse files Browse the repository at this point in the history
 Clean the GO mod files by removing the unnecessary indirect imports
  • Loading branch information
k8s-ci-robot committed Apr 13, 2020
2 parents b2ce2e0 + 8985369 commit c8d4a3d
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 52 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 `##`.
Expand All @@ -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

Expand All @@ -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/controller-gen@v0.2.5

.PHONY: lint
lint: ## Run code lint checks
./scripts/verify.sh
Expand Down
18 changes: 4 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,12 @@ module sigs.k8s.io/kubebuilder
go 1.13

require (
github.com/gobuffalo/flect v0.2.0
github.com/golang/protobuf v1.3.4 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/gobuffalo/flect v0.2.1
github.com/onsi/ginkgo v1.12.0
github.com/onsi/gomega v1.9.0
github.com/spf13/afero v1.2.2
github.com/spf13/cobra v0.0.5
github.com/spf13/cobra v0.0.7
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.4.0 // indirect
golang.org/x/mod v0.2.0 // indirect
golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect
golang.org/x/sys v0.0.0-20200302083256-062a44052db1 // indirect
golang.org/x/text v0.3.2 // indirect
golang.org/x/tools v0.0.0-20200301222351-066e0c02454c
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
sigs.k8s.io/yaml v1.1.0
golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b
sigs.k8s.io/yaml v1.2.0
)
Loading

0 comments on commit c8d4a3d

Please sign in to comment.