Skip to content

Commit fb8d214

Browse files
[Internal] Fix make license command (#1038)
It was adding redundant line comment to license header
1 parent 10bd6c7 commit fb8d214

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ deps/
1010
**/*.enterprise.go
1111
**/enterprise/**
1212
enterprise.mk
13-
local/
13+
local/
14+
tools/codegen/boilerplate.go.txt

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ GOLANGCI_ENABLED=deadcode gosimple govet ineffassign staticcheck structcheck typ
189189
.PHONY: license-verify
190190
license-verify:
191191
@echo ">> Verify license of files"
192-
@$(GOPATH)/bin/addlicense -f "./tools/codegen/boilerplate.go.txt" -check $(SOURCES)
192+
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" -check $(SOURCES)
193193

194194
.PHONY: fmt
195195
fmt:
@@ -199,7 +199,7 @@ fmt:
199199
.PHONY: license
200200
license:
201201
@echo ">> Ensuring license of files"
202-
@$(GOPATH)/bin/addlicense -f "./tools/codegen/boilerplate.go.txt" $(SOURCES)
202+
@$(GOPATH)/bin/addlicense -f "./tools/codegen/license-header.txt" $(SOURCES)
203203

204204
.PHONY: fmt-verify
205205
fmt-verify: license-verify
@@ -245,6 +245,7 @@ update-generated:
245245
@rm -fr $(ORGDIR)
246246
@mkdir -p $(ORGDIR)
247247
@ln -s -f $(SCRIPTDIR) $(ORGDIR)/kube-arangodb
248+
@sed -e 's/^/\/\/ /' -e 's/ *$$//' $(ROOTDIR)/tools/codegen/license-header.txt > $(ROOTDIR)/tools/codegen/boilerplate.go.txt
248249
GOPATH=$(GOBUILDDIR) $(VENDORDIR)/k8s.io/code-generator/generate-groups.sh \
249250
"all" \
250251
"github.com/arangodb/kube-arangodb/pkg/generated" \

tools/codegen/boilerplate.go.txt

-19
This file was deleted.

tools/codegen/license-header.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
DISCLAIMER
3+
4+
Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
Copyright holder is ArangoDB GmbH, Cologne, Germany
19+

0 commit comments

Comments
 (0)