1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Use different license header based on distribution (CE/EE) (#1422)

This commit is contained in:
Nikita Vaniasin 2023-09-28 12:44:41 +02:00 committed by GitHub
parent f54fbe783e
commit 63f8c047b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View file

@ -10,5 +10,6 @@ deps/
**/*.enterprise.go
**/enterprise/**
enterprise.mk
license-header.enterprise.txt
local/
tools/codegen/boilerplate.go.txt

View file

@ -213,6 +213,9 @@ EXCLUDE_FILES := *generated.deepcopy.go
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)")
SOURCES := $(shell $(SOURCES_QUERY))
NON_EE_SOURCES_QUERY := $(SOURCES_QUERY) ! -name '*.enterprise.go'
NON_EE_SOURCES := $(shell $(NON_EE_SOURCES_QUERY))
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
YAML_EXCLUDE_FILES :=
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
.PHONY: license-verify
license-verify:
@echo ">> Verify license of files"
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" -check $(SOURCES) $(PROTOSOURCES)
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" -check $(NON_EE_SOURCES) $(PROTOSOURCES)
.PHONY: license-range-verify
license-range-verify:
@ -271,7 +274,7 @@ yamlfmt:
.PHONY: license
license:
@echo ">> Ensuring license of files"
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" $(SOURCES) $(PROTOSOURCES)
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" $(NON_EE_SOURCES) $(PROTOSOURCES)
.PHONY: fmt-verify
fmt-verify: license-verify