Skip to content

Commit 69acf52

Browse files
authored
Add license header to files (#943)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent b2636f8 commit 69acf52

File tree

299 files changed

+3025
-537
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+3025
-537
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ jobs:
2727
run: echo ${{ steps.buildx.outputs.platforms }}
2828

2929
- name: Run checks
30-
run: make ci
30+
run: |
31+
sudo apt-get -qq update
32+
sudo apt-get install -y bzr
33+
make ci
3134
3235
- name: Build
3336
env:

Makefile

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ BUILD_DIRS := bin/$(OS)_$(ARCH) \
9494
$(HOME)/.kube \
9595
$(HOME)/.minikube
9696

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
100100

101101
# If you want to build all binaries, see the 'all-build' rule.
102102
# If you want to build all containers, see the 'all-container' rule.
@@ -158,7 +158,7 @@ clientset:
158158
$(GO_PKG)/$(REPO)/apis \
159159
$(GO_PKG)/$(REPO)/apis \
160160
repositories:v1alpha1 \
161-
--go-header-file "./hack/boilerplate.go.txt"
161+
--go-header-file "./hack/license/go.txt"
162162

163163
# for both CRD and EAS types
164164
@docker run --rm \
@@ -174,7 +174,7 @@ clientset:
174174
$(GO_PKG)/$(REPO)/client \
175175
$(GO_PKG)/$(REPO)/apis \
176176
"$(API_GROUPS)" \
177-
--go-header-file "./hack/boilerplate.go.txt"
177+
--go-header-file "./hack/license/go.txt"
178178

179179
# Generate openapi schema
180180
.PHONY: openapi
@@ -203,7 +203,7 @@ openapi-%:
203203
$(CODE_GENERATOR_IMAGE) \
204204
openapi-gen \
205205
--v 1 --logtostderr \
206-
--go-header-file "./hack/boilerplate.go.txt" \
206+
--go-header-file "./hack/license/go.txt" \
207207
--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" \
208208
--output-package "$(GO_PKG)/$(REPO)/apis/$(subst _,/,$*)" \
209209
--report-filename api/api-rules/violation_exceptions.list
@@ -489,8 +489,21 @@ verify-gen: gen fmt
489489
echo "files are out of date, run make gen fmt"; exit 1; \
490490
fi
491491

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+
492505
.PHONY: ci
493-
ci: verify lint build unit-tests #cover
506+
ci: verify check-license lint build unit-tests #cover
494507

495508
.PHONY: qa
496509
qa:

apis/constants.go

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

318
const (

apis/repositories/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Stash Authors.
2+
Copyright The Stash Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

apis/repositories/install/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Stash Authors.
2+
Copyright The Stash Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

apis/repositories/install/roundtrip_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Stash Authors.
2+
Copyright The Stash Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

apis/repositories/register.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Stash Authors.
2+
Copyright The Stash Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

apis/repositories/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Stash Authors.
2+
Copyright The Stash Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

apis/repositories/v1alpha1/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Stash Authors.
2+
Copyright The Stash Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

apis/repositories/v1alpha1/openapi_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)