This repository was archived by the owner on Mar 22, 2022. It is now read-only.
File tree 13 files changed +201
-0
lines changed
13 files changed +201
-0
lines changed Original file line number Diff line number Diff line change 17
17
- name : Lint
18
18
run : DOCKER_BUILDKIT=1 make lint
19
19
20
+ - name : Check licenses
21
+ run : DOCKER_BUILDKIT=1 make check-license
22
+
20
23
- name : Build
21
24
run : make build
22
25
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
+
1
15
.DEFAULT_GOAL := help
2
16
3
17
PACKAGE =github.com/compose-spec/compose-ref
@@ -25,6 +39,10 @@ build-validate-image:
25
39
lint : build-validate-image
26
40
docker run --rm $(IMAGE_PREFIX ) validate bash -c " golangci-lint run --config ./golangci.yml ./"
27
41
42
+ .PHONY : check-license
43
+ check-license : build-validate-image
44
+ docker run --rm $(IMAGE_PREFIX ) validate bash -c " ./scripts/validate/fileheader"
45
+
28
46
.PHONY : setup
29
47
setup : # # Setup the precommit hook
30
48
@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
+
1
15
FROM golang:1.14
2
16
3
17
WORKDIR /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
+
1
17
package main
2
18
3
19
import (
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
+
1
17
package internal
2
18
3
19
import (
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
+
1
17
package internal
2
18
3
19
const (
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
+
1
17
package internal
2
18
3
19
import (
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
+
1
17
package internal
2
18
3
19
import (
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
+
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
+
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
+
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