Skip to content

Commit 63f8c04

Browse files
Use different license header based on distribution (CE/EE) (#1422)
1 parent f54fbe7 commit 63f8c04

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ deps/
1010
**/*.enterprise.go
1111
**/enterprise/**
1212
enterprise.mk
13+
license-header.enterprise.txt
1314
local/
1415
tools/codegen/boilerplate.go.txt

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ EXCLUDE_FILES := *generated.deepcopy.go
213213
SOURCES_QUERY := find ./ -type f -name '*.go' ! -name '*.pb.go' $(foreach EXCLUDE_DIR,$(EXCLUDE_DIRS), ! -path "*/$(EXCLUDE_DIR)/*") $(foreach EXCLUDE_FILE,$(EXCLUDE_FILES), ! -path "*/$(EXCLUDE_FILE)")
214214
SOURCES := $(shell $(SOURCES_QUERY))
215215

216+
NON_EE_SOURCES_QUERY := $(SOURCES_QUERY) ! -name '*.enterprise.go'
217+
NON_EE_SOURCES := $(shell $(NON_EE_SOURCES_QUERY))
218+
216219
YAML_EXCLUDE_DIRS := vendor .gobuild deps tools pkg/generated/clientset pkg/generated/informers pkg/generated/listers chart/kube-arangodb/templates chart/kube-arangodb-crd/templates chart/arangodb-ingress-proxy/templates
217220
YAML_EXCLUDE_FILES :=
218221
YAML_QUERY := find ./ -type f -name '*.yaml' $(foreach EXCLUDE_DIR,$(YAML_EXCLUDE_DIRS), ! -path "*/$(EXCLUDE_DIR)/*") $(foreach EXCLUDE_FILE,$(YAML_EXCLUDE_FILES), ! -path "*/$(EXCLUDE_FILE)")
@@ -246,7 +249,7 @@ allall: all
246249
.PHONY: license-verify
247250
license-verify:
248251
@echo ">> Verify license of files"
249-
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" -check $(SOURCES) $(PROTOSOURCES)
252+
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" -check $(NON_EE_SOURCES) $(PROTOSOURCES)
250253

251254
.PHONY: license-range-verify
252255
license-range-verify:
@@ -271,7 +274,7 @@ yamlfmt:
271274
.PHONY: license
272275
license:
273276
@echo ">> Ensuring license of files"
274-
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" $(SOURCES) $(PROTOSOURCES)
277+
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" $(NON_EE_SOURCES) $(PROTOSOURCES)
275278

276279
.PHONY: fmt-verify
277280
fmt-verify: license-verify

0 commit comments

Comments
 (0)