Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Commit af6bdd4

Browse files
authored
Merge pull request #38 from chris-crone/vendor-modules
Vendor Go modules
2 parents fd5d0c2 + ca54c03 commit af6bdd4

File tree

853 files changed

+335997
-10
lines changed

Some content is hidden

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

853 files changed

+335997
-10
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@ jobs:
66
runs-on: ubuntu-latest
77
timeout-minutes: 5
88
steps:
9-
- name: Set up Go 1.13
9+
- name: Set up Go 1.14
1010
uses: actions/setup-go@v1
1111
with:
12-
go-version: 1.13
12+
go-version: 1.14
1313
id: go
1414

1515
- name: Check out code
1616
uses: actions/checkout@v2
1717

18-
- name: Get dependencies
19-
run: go get -v -t -d ./...
18+
- name: Lint
19+
run: DOCKER_BUILDKIT=1 make lint
20+
21+
- name: Check licenses
22+
run: DOCKER_BUILDKIT=1 make check-license
2023

2124
- name: Build
2225
run: make build

Makefile

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,47 @@
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

17+
PACKAGE=github.com/compose-spec/compose-ref
18+
IMAGE_PREFIX=composespec/compose-ref-
19+
20+
GOFLAGS=-mod=vendor
21+
322
.PHONY: build
423
build: ## Build compose-ref binary
5-
GOPRIVATE=github.com/compose-spec/compose-go go build compose-ref.go
24+
GOPRIVATE=$(PACKAGE) GOFLAGS=$(GOFLAGS) go build compose-ref.go
625

726
.PHONY: test
827
test: ## Run tests
9-
GOPRIVATE=github.com/compose-spec/compose-go go test ./... -v
28+
GOPRIVATE=$(PACKAGE) GOFLAGS=$(GOFLAGS) go test ./... -v
1029

1130
.PHONY: fmt
1231
fmt: ## Format go files
1332
@goimports -e -w ./
1433

34+
.PHONY: build-validate-image
35+
build-validate-image:
36+
docker build . -f ci/Dockerfile -t $(IMAGE_PREFIX)validate
37+
1538
.PHONY: lint
16-
lint: ## Verify Go files
17-
golangci-lint run --config ./golangci.yml ./
39+
lint: build-validate-image
40+
docker run --rm $(IMAGE_PREFIX)validate bash -c "golangci-lint run --config ./golangci.yml ./"
41+
42+
.PHONY: check-license
43+
check-license: build-validate-image
44+
docker run --rm $(IMAGE_PREFIX)validate bash -c "./scripts/validate/fileheader"
1845

1946
.PHONY: setup
2047
setup: ## Setup the precommit hook

ci/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
15+
FROM golang:1.14
16+
17+
WORKDIR /go/src
18+
19+
ARG GOLANGCILINT_VERSION=v1.24.0
20+
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCILINT_VERSION}
21+
22+
ENV GOFLAGS=-mod=vendor
23+
COPY . .

compose-ref.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
package main
218

319
import (

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require (
44
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
55
github.com/Microsoft/go-winio v0.4.14 // indirect
66
github.com/compose-spec/compose-go v0.0.0-20200131085702-0b38cc2d8e6b
7-
github.com/containerd/containerd v1.3.2
7+
github.com/containerd/containerd v1.3.2 // indirect
88
github.com/docker/distribution v2.7.1+incompatible // indirect
99
github.com/docker/docker v1.4.2-0.20191113042239-ea84732a7725
1010
github.com/docker/go-connections v0.4.0

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA
88
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
99
github.com/compose-spec/compose-go v0.0.0-20200131085702-0b38cc2d8e6b h1:VK0c2Hfrg9FHjvJpWfGwiHPP2UeU0QZ6/5/dN0ehbSQ=
1010
github.com/compose-spec/compose-go v0.0.0-20200131085702-0b38cc2d8e6b/go.mod h1:KoJjdV81vERSyYVuQD63nryyt8ZTlqTWe8JuJIMhRo4=
11-
github.com/compose-spec/compose-go v0.0.0-20200203134931-8fe2177d8940 h1:MPp+H0Q8h0XyOi89BccSo5LxAf2rd/B1cDPjloSZv5k=
1211
github.com/containerd/containerd v1.3.2 h1:ForxmXkA6tPIvffbrDAcPUIB32QgXkt2XFj+F0UxetA=
1312
github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
1413
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=

internal/container.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
package internal
218

319
import (

internal/labels.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
package internal
218

319
const (

internal/network.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
package internal
218

319
import (

internal/volume.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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+
117
package internal
218

319
import (

0 commit comments

Comments
 (0)