@@ -94,9 +94,9 @@ BUILD_DIRS := bin/$(OS)_$(ARCH) \
94
94
$(HOME ) /.kube \
95
95
$(HOME ) /.minikube
96
96
97
- DOCKERFILE_PROD = Dockerfile.in
98
- DOCKERFILE_DBG = Dockerfile. dbg
99
- DOCKERFILE_TEST = Dockerfile. test
97
+ DOCKERFILE_PROD = in.Dockerfile
98
+ DOCKERFILE_DBG = dbg.Dockerfile
99
+ DOCKERFILE_TEST = test.Dockerfile
100
100
101
101
# If you want to build all binaries, see the 'all-build' rule.
102
102
# If you want to build all containers, see the 'all-container' rule.
@@ -158,7 +158,7 @@ clientset:
158
158
$(GO_PKG ) /$(REPO ) /apis \
159
159
$(GO_PKG ) /$(REPO ) /apis \
160
160
repositories:v1alpha1 \
161
- --go-header-file " ./hack/boilerplate. go.txt"
161
+ --go-header-file " ./hack/license/ go.txt"
162
162
163
163
# for both CRD and EAS types
164
164
@docker run --rm \
@@ -174,7 +174,7 @@ clientset:
174
174
$(GO_PKG)/$(REPO)/client \
175
175
$(GO_PKG)/$(REPO)/apis \
176
176
"$(API_GROUPS)" \
177
- --go-header-file "./hack/boilerplate. go.txt"
177
+ --go-header-file "./hack/license/ go.txt"
178
178
179
179
# Generate openapi schema
180
180
.PHONY : openapi
@@ -203,7 +203,7 @@ openapi-%:
203
203
$(CODE_GENERATOR_IMAGE ) \
204
204
openapi-gen \
205
205
--v 1 --logtostderr \
206
- --go-header-file " ./hack/boilerplate. go.txt" \
206
+ --go-header-file " ./hack/license/ go.txt" \
207
207
--input-dirs " $( GO_PKG) /$( REPO) /apis/$( subst _,/,$* ) ,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/util/intstr,k8s.io/apimachinery/pkg/version,k8s.io/api/core/v1,k8s.io/api/apps/v1,kmodules.xyz/offshoot-api/api/v1,github.com/appscode/go/encoding/json/types,kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1,k8s.io/api/rbac/v1,kmodules.xyz/objectstore-api/api/v1" \
208
208
--output-package " $( GO_PKG) /$( REPO) /apis/$( subst _,/,$* ) " \
209
209
--report-filename api/api-rules/violation_exceptions.list
@@ -489,8 +489,21 @@ verify-gen: gen fmt
489
489
echo " files are out of date, run make gen fmt" ; exit 1; \
490
490
fi
491
491
492
+ .PHONY : check-license
493
+ check-license :
494
+ @echo " Checking files have proper license header"
495
+ @docker run --rm \
496
+ -u $$(id -u ) :$$(id -g ) \
497
+ -v /tmp:/.cache \
498
+ -v $$(pwd ) :$(DOCKER_REPO_ROOT ) \
499
+ -w $(DOCKER_REPO_ROOT ) \
500
+ --env HTTP_PROXY=$(HTTP_PROXY ) \
501
+ --env HTTPS_PROXY=$(HTTPS_PROXY ) \
502
+ $(BUILD_IMAGE ) \
503
+ ltag -t " ./hack/license" --excludes " vendor contrib" --check -v
504
+
492
505
.PHONY : ci
493
- ci : verify lint build unit-tests # cover
506
+ ci : verify check-license lint build unit-tests # cover
494
507
495
508
.PHONY : qa
496
509
qa :
0 commit comments