This repository was archived by the owner on Mar 22, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 13 files changed +201
-0
lines changed
Expand file tree Collapse file tree 13 files changed +201
-0
lines changed Original file line number Diff line number Diff line change 1717 - name : Lint
1818 run : DOCKER_BUILDKIT=1 make lint
1919
20+ - name : Check licenses
21+ run : DOCKER_BUILDKIT=1 make check-license
22+
2023 - name : Build
2124 run : make build
2225
Original file line number Diff line number Diff line change 1+ # Copyright 2020 The Compose Specification Authors.
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.DEFAULT_GOAL := help
216
317PACKAGE =github.com/compose-spec/compose-ref
@@ -25,6 +39,10 @@ build-validate-image:
2539lint : build-validate-image
2640 docker run --rm $(IMAGE_PREFIX ) validate bash -c " golangci-lint run --config ./golangci.yml ./"
2741
42+ .PHONY : check-license
43+ check-license : build-validate-image
44+ docker run --rm $(IMAGE_PREFIX ) validate bash -c " ./scripts/validate/fileheader"
45+
2846.PHONY : setup
2947setup : # # Setup the precommit hook
3048 @which pre-commit > /dev/null 2>&1 || (echo " pre-commit not installed see README." && false)
Original file line number Diff line number Diff line change 1+ # Copyright 2020 The Compose Specification Authors.
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+
115FROM golang:1.14
216
317WORKDIR /go/src
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2020 The Compose Specification 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+ */
16+
117package main
218
319import (
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2020 The Compose Specification 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+ */
16+
117package internal
218
319import (
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2020 The Compose Specification 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+ */
16+
117package internal
218
319const (
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2020 The Compose Specification 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+ */
16+
117package internal
218
319import (
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2020 The Compose Specification 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+ */
16+
117package internal
218
319import (
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright The Compose Specification Authors.
4+
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+
18+ set -eu -o pipefail
19+
20+ if ! command -v ltag; then
21+ >&2 echo " ERROR: ltag not found. Install with:"
22+ >&2 echo " go get -u github.com/kunalkushwaha/ltag"
23+ exit 1
24+ fi
25+
26+ BASEPATH=" ${1-} "
27+
28+ ltag -t " ${BASEPATH} scripts/validate/template" --excludes " validate vendor" --check -v
Original file line number Diff line number Diff line change 1+ # Copyright 2020 The Compose Specification Authors.
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+
You can’t perform that action at this time.
0 commit comments