Skip to content

Commit f3229be

Browse files
committed
Check headers in CI
Using a fork of addlicense until google/addlicense#104 merges
1 parent 105295f commit f3229be

File tree

5 files changed

+58
-2
lines changed

5 files changed

+58
-2
lines changed

.github/workflows/porch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ jobs:
3838
- name: Build server
3939
run: make porch
4040
working-directory: ./porch
41-
- name: Build controllers
41+
- name: Run CI
4242
run: make ci
43-
working-directory: ./porch/controllers
43+
working-directory: ./porch
4444
- name: Test
4545
run: make test
4646
working-directory: ./porch

porch/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,17 @@ run-jaeger:
104104
.PHONY: porch
105105
porch:
106106
cd apiserver; go build ./cmd/porch
107+
108+
.PHONY: verify-headers
109+
verify-headers:
110+
# TODO: switch to google/addlicense once we have https://github.com/google/addlicense/pull/104
111+
go run github.com/justinsb/[email protected] -c "Google LLC" -l apache --check --ignore ".build/**" .
112+
113+
.PHONY: fix-headers
114+
fix-headers:
115+
# TODO: switch to google/addlicense once we have https://github.com/google/addlicense/pull/104
116+
go run github.com/justinsb/[email protected] -c "Google LLC" -l apache --ignore ".build/**" .
117+
118+
.PHONY: ci
119+
ci: verify-headers
120+
make -C controllers ci

porch/controllers/Makefile

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

porch/controllers/remoterootsync/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
# GCP project to use for development
216
GCP_PROJECT_ID ?= $(shell gcloud config get-value project)
317

porch/repository/doc.go

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

0 commit comments

Comments
 (0)