@@ -42,7 +42,7 @@ install-kustomize: FORCE
4242
4343fmt : FORCE install-gofumpt
4444 @printf " \e[1;36m>> gofumpt -l -w .\e[0m\n"
45- @gofumpt -l -w .
45+ @gofumpt -l -w $( shell git ls-files ' * .go' | grep -v '^internal/provider/openconfig')
4646
4747# Run the e2e tests against a k8s cluster.
4848test-e2e : FORCE
@@ -84,17 +84,13 @@ undeploy: FORCE install-kustomize
8484
8585# Install CRDs into the k8s cluster
8686deploy-crds : FORCE generate install-kustomize
87- @if [ -d config/crd ]; then \
88- @printf " \e[1;36m>> kustomize build config/crd | kubectl apply -f -\e[0m\n" ; \
89- @kustomize build config/crd | kubectl apply -f -; \
90- fi
87+ @printf " \e[1;36m>> kustomize build config/crd | kubectl apply -f -\e[0m\n"
88+ @kustomize build config/crd | kubectl apply -f -
9189
9290# Uninstall CRDs from the k8s cluster
9391undeploy-crds : FORCE install-kustomize
94- @if [ -d config/crd ]; then \
95- @printf " \e[1;36m>> kustomize build config/crd | kubectl delete -f -\e[0m\n" ; \
96- @kustomize build config/crd | kubectl delete --ignore-not-found=true -f -; \
97- fi
92+ @printf " \e[1;36m>> kustomize build config/crd | kubectl delete -f -\e[0m\n"
93+ @kustomize build config/crd | kubectl delete --ignore-not-found=true -f -
9894
9995# Create a Kind cluster for local development and testing.
10096kind-create : FORCE
@@ -173,7 +169,7 @@ BININFO_BUILD_DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
173169build-all : build/network-operator
174170
175171build/network-operator : FORCE generate
176- env $(GO_BUILDENV ) go build $(GO_BUILDFLAGS ) -ldflags ' -s -w -X github.com/sapcc/go-api-declarations/bininfo.binName=network-operator -X github.com/sapcc/go-api-declarations/bininfo.version=$(BININFO_VERSION) -X github.com/sapcc/go-api-declarations/bininfo.commit=$(BININFO_COMMIT_HASH) -X github.com/sapcc/go-api-declarations/bininfo.buildDate=$(BININFO_BUILD_DATE) $(GO_LDFLAGS)' -o build/network-operator ./cmd/manager
172+ env $(GO_BUILDENV ) go build $(GO_BUILDFLAGS ) -ldflags ' -s -w -X github.com/sapcc/go-api-declarations/bininfo.binName=network-operator -X github.com/sapcc/go-api-declarations/bininfo.version=$(BININFO_VERSION) -X github.com/sapcc/go-api-declarations/bininfo.commit=$(BININFO_COMMIT_HASH) -X github.com/sapcc/go-api-declarations/bininfo.buildDate=$(BININFO_BUILD_DATE) $(GO_LDFLAGS)' -o build/network-operator ./cmd
177173
178174DESTDIR =
179175ifeq ($(shell uname -s) ,Darwin)
@@ -192,7 +188,7 @@ ifeq ($(GO_TESTPKGS),)
192188GO_TESTPKGS := ./...
193189endif
194190# which packages to measure coverage for
195- GO_COVERPKGS := $(shell go list ./... | grep -E '/internal')
191+ GO_COVERPKGS := $(shell go list ./... | grep -E '/internal' | grep -Ev '/internal/provider/openconfig' )
196192# to get around weird Makefile syntax restrictions, we need variables containing nothing, a space and comma
197193null :=
198194space := $(null ) $(null )
0 commit comments