Skip to content

Commit

Permalink
Check headers in CI
Browse files Browse the repository at this point in the history
Using a fork of addlicense until google/addlicense#104 merges
  • Loading branch information
justinsb committed Jan 31, 2022
1 parent 105295f commit f3229be
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/porch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
- name: Build server
run: make porch
working-directory: ./porch
- name: Build controllers
- name: Run CI
run: make ci
working-directory: ./porch/controllers
working-directory: ./porch
- name: Test
run: make test
working-directory: ./porch
14 changes: 14 additions & 0 deletions porch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,17 @@ run-jaeger:
.PHONY: porch
porch:
cd apiserver; go build ./cmd/porch

.PHONY: verify-headers
verify-headers:
# TODO: switch to google/addlicense once we have https://github.com/google/addlicense/pull/104
go run github.com/justinsb/[email protected] -c "Google LLC" -l apache --check --ignore ".build/**" .

.PHONY: fix-headers
fix-headers:
# TODO: switch to google/addlicense once we have https://github.com/google/addlicense/pull/104
go run github.com/justinsb/[email protected] -c "Google LLC" -l apache --ignore ".build/**" .

.PHONY: ci
ci: verify-headers
make -C controllers ci
14 changes: 14 additions & 0 deletions porch/controllers/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

.PHONY: build
build:
cd remoterootsync; go build .
Expand Down
14 changes: 14 additions & 0 deletions porch/controllers/remoterootsync/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# GCP project to use for development
GCP_PROJECT_ID ?= $(shell gcloud config get-value project)

Expand Down
14 changes: 14 additions & 0 deletions porch/repository/doc.go
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http:https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package repository

0 comments on commit f3229be

Please sign in to comment.