diff --git a/Makefile b/Makefile index f7bba2f..d2c37f1 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ all: manager # Run tests KUBEBUILDER_ASSETS?="$(shell $(ENVTEST) --arch=$(ENVTEST_ARCH) use -i $(ENVTEST_KUBERNETES_VERSION) --bin-dir=$(ENVTEST_ASSETS_DIR) -p path)" -test: generate fmt vet manifests install-envtest +test: generate tidy fmt vet manifests install-envtest KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./... -coverprofile cover.out # Build manager binary @@ -46,6 +46,10 @@ deploy: manifests manifests: controller-gen $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=source-reader webhook paths="./..." output:crd:artifacts:config=config/crd/bases +# Run go tidy to cleanup go.mod +tidy: + go mod tidy + # Run go fmt against code fmt: go fmt ./... diff --git a/go.mod b/go.mod index 9f1d172..e590e0d 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/fluxcd/pkg/runtime v0.12.3 github.com/fluxcd/pkg/untar v0.1.0 github.com/fluxcd/source-controller/api v0.20.1 - github.com/go-logr/logr v1.2.2 github.com/spf13/pflag v1.0.5 k8s.io/apimachinery v0.23.1 k8s.io/client-go v0.23.1 @@ -22,6 +21,7 @@ require ( github.com/fluxcd/pkg/apis/acl v0.0.3 // indirect github.com/fluxcd/pkg/apis/meta v0.10.2 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/go-logr/logr v1.2.2 // indirect github.com/go-logr/zapr v1.2.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect