Skip to content

Commit 1097c8b

Browse files
authored
Merge pull request #144 from SamWhited/modules
Support Go Modules
2 parents f65d91d + 91c91a7 commit 1097c8b

243 files changed

Lines changed: 36805 additions & 11560 deletions

File tree

Some content is hidden

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

.travis.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,44 @@ language: go
22
sudo: required
33

44
go:
5-
- 1.9.x
6-
- 1.10.x
75
- 1.11.x
6+
- 1.12.x
7+
- 1.13.x
88
- tip
99

1010
go_import_path: github.com/containerd/continuity
1111

1212
env:
13+
global:
14+
- GO111MODULE=on
15+
jobs:
1316
# NOTE: we cannot set GOOS directly (because gimme overrides the value)
1417
- TRAVIS_GOOS=windows
1518
- TRAVIS_GOOS=linux
1619
- TRAVIS_GOOS=darwin
1720

1821
install:
19-
- go get -u github.com/vbatts/git-validation
20-
- go get -u github.com/kunalkushwaha/ltag
21-
- go get -u github.com/LK4D4/vndr
22+
- pushd /
23+
- GO111MODULE=off go get -u github.com/vbatts/git-validation
24+
- GO111MODULE=off go get -u github.com/kunalkushwaha/ltag
25+
- popd
2226

2327
before_script:
2428
- pushd ..; git clone https://github.com/containerd/project; popd
2529

2630
script:
2731
- export GOOS=${TRAVIS_GOOS}
28-
- DCO_VERBOSITY=-q ../project/script/validate/dco
29-
- ../project/script/validate/fileheader ../project/
30-
- ../project/script/validate/vendor
3132
- make build binaries
3233
- if [ "$GOOS" = "linux" ]; then make vet test; fi
3334
- if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-test; fi
3435
- if [ "$GOOS" != "linux" ]; then make test-compile; fi
36+
37+
jobs:
38+
include:
39+
- stage: validate
40+
script:
41+
- DCO_VERBOSITY=-q ../project/script/validate/dco
42+
- ../project/script/validate/fileheader ../project/
43+
- ../project/script/validate/vendor
44+
go: 1.13.x
45+
env: TRAVIS_GOOS=linux

Makefile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ PREFIX?=$(shell pwd)
1818
# Used to populate version variable in main package.
1919
VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
2020

21-
GO_LDFLAGS=-ldflags "-X `go list ./version`.Version=$(VERSION)"
21+
GO_LDFLAGS=-ldflags "-X `go list -mod=vendor ./version`.Version=$(VERSION)"
2222

2323
PKG=github.com/containerd/continuity
2424

25-
PACKAGES=$(shell go list ./... | grep -v /vendor/)
25+
PACKAGES=$(shell go list -mod=vendor ./... | grep -v /vendor/)
2626
TEST_REQUIRES_ROOT_PACKAGES=$(filter \
2727
${PACKAGES}, \
2828
$(shell \
@@ -33,7 +33,7 @@ TEST_REQUIRES_ROOT_PACKAGES=$(filter \
3333
done | sort -u) \
3434
)
3535

36-
.PHONY: clean all fmt vet lint build test binaries setup
36+
.PHONY: clean all fmt vet lint build test binaries
3737
.DEFAULT: default
3838
# skip lint at the moment
3939
all: AUTHORS clean fmt vet fmt build test binaries
@@ -47,20 +47,16 @@ version/version.go:
4747

4848
${PREFIX}/bin/continuity: version/version.go $(shell find . -type f -name '*.go')
4949
@echo "+ $@"
50-
@go build -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/continuity
51-
52-
setup:
53-
@echo "+ $@"
54-
@go get -u github.com/golang/lint/golint
50+
@go build -mod=vendor -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/continuity
5551

5652
generate:
57-
go generate $(PACKAGES)
53+
go generate -mod=vendor $(PACKAGES)
5854

5955
# Depends on binaries because vet will silently fail if it can't load compiled
6056
# imports
6157
vet: binaries
6258
@echo "+ $@"
63-
@go vet $(PACKAGES)
59+
@go vet -mod=vendor $(PACKAGES)
6460

6561
fmt:
6662
@echo "+ $@"
@@ -73,19 +69,19 @@ lint:
7369

7470
build:
7571
@echo "+ $@"
76-
@go build -v ${GO_LDFLAGS} $(PACKAGES)
72+
@go build -mod=vendor -v ${GO_LDFLAGS} $(PACKAGES)
7773

7874
test:
7975
@echo "+ $@"
80-
@go test $(PACKAGES)
76+
@go test -mod=vendor $(PACKAGES)
8177

8278
root-test:
8379
@echo "+ $@"
8480
@go test ${TEST_REQUIRES_ROOT_PACKAGES} -test.root
8581

8682
test-compile:
8783
@echo "+ $@"
88-
@for pkg in $(PACKAGES); do go test -c $$pkg; done
84+
@for pkg in $(PACKAGES); do go test -mod=vendor -c $$pkg; done
8985

9086
binaries: ${PREFIX}/bin/continuity
9187
@echo "+ $@"

go.mod

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module github.com/containerd/continuity
2+
3+
go 1.11
4+
5+
require (
6+
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898
7+
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
8+
github.com/golang/protobuf v1.2.0
9+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
10+
github.com/onsi/ginkgo v1.10.1 // indirect
11+
github.com/onsi/gomega v1.7.0 // indirect
12+
github.com/opencontainers/go-digest v1.0.0-rc1
13+
github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7
14+
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2
15+
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee
16+
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95 // indirect
17+
github.com/stretchr/testify v1.4.0 // indirect
18+
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3 // indirect
19+
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
20+
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
21+
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
22+
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
23+
)

go.sum

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898 h1:SC+c6A1qTFstO9qmB86mPV2IpYme/2ZoEQ0hrP+wo+Q=
2+
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
3+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
4+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5+
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=
6+
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
7+
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
8+
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
9+
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
10+
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
11+
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
12+
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
13+
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
14+
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
15+
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
16+
github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
17+
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
18+
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
19+
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
20+
github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
21+
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
22+
github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7 h1:RcqIXZDN7Vz5lgK7+0h3MFF2JNgEu4h91palXJLJ354=
23+
github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
24+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
25+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
26+
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2 h1:a07zp0wovcAE2jH+wlD22JLqUH6Rdl8Aon+NiyPxE+0=
27+
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
28+
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee h1:GQkkv3XSnxhAMjdq2wLfEnptEVr+2BNvmHizILHn+d4=
29+
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
30+
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95 h1:j8jxLbQ0+T1DFggy6XoGvyUnrJWPR/JybflPvu5rwS4=
31+
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
32+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
33+
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
34+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
35+
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3 h1:f4/ZD59VsBOaJmWeI2yqtHvJhmRRPzi73C88ZtfhAIk=
36+
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
37+
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
38+
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
39+
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
40+
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
41+
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
42+
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
43+
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
44+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
45+
gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
46+
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
47+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
48+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
49+
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
50+
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
51+
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0=
52+
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
53+
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
54+
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
55+
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
56+
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
57+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

vendor.conf

Lines changed: 0 additions & 13 deletions
This file was deleted.

vendor/bazil.org/fuse/.gitattributes

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/bazil.org/fuse/.gitignore

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/dustin/go-humanize/.travis.yml

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang/protobuf/AUTHORS

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/golang/protobuf/CONTRIBUTORS

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)