Skip to content

Commit

Permalink
make gen-objects should skip when nothing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasheed Abdul-Aziz committed Sep 29, 2021
1 parent f7dbd6d commit 39baeb0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ gen-objects:
object \
paths=./pkg/apis/v1alpha1

.PHONY: gen-manifests
gen-manifests:
crd_non_sources := pkg/apis/v1alpha1/zz_generated.deepcopy.go $(wildcard pkg/apis/v1alpha1/*_test.go)
crd_sources := $(filter-out $(crd_non_sources),$(wildcard pkg/apis/v1alpha1/*.go))

config/crd/bases/*.yaml &: $(crd_sources)
go run sigs.k8s.io/controller-tools/cmd/controller-gen \
crd \
paths=./pkg/apis/v1alpha1 \
Expand All @@ -22,6 +24,9 @@ gen-manifests:
-f ./hack/boilerplate.go.txt \
config/crd/bases

.PHONY: gen-manifests
gen-manifests: config/crd/bases/*.yaml

test_crd_sources := $(wildcard tests/resources/*.go)
test_object_sources := $(filter-out tests/resources/zz_generated.deepcopy.go,$(test_crd_sources))

Expand Down

0 comments on commit 39baeb0

Please sign in to comment.