Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Add explicit library dependencies
Browse files Browse the repository at this point in the history
Adds Gopkg.toml and Gopkg.lock with initial dependency
versions. Includes workaround for Apache Thrift repo migration.
Ignores the vendor folder and adds a travis test to ensure dependency
version updates don't break the build.

Fixes #684.
  • Loading branch information
johanbrandhorst committed Apr 16, 2018
1 parent 5bb1e81 commit c8f394d
Show file tree
Hide file tree
Showing 4 changed files with 296 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
# go.opencensus.io/exporter/aws
/exporter/aws/

# Ignore Go vendor directory
/.vendor/
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ notifications:
before_script:
- GO_FILES=$(find . -iname '*.go' | grep -v /vendor/) # All the .go files, excluding vendor/ if any
- PKGS=$(go list ./... | grep -v /vendor/) # All the import paths, excluding vendor/ if any
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh # Install latest dep release

script:
- dep ensure -v
- go build ./... # Ensure dependency updates don't break build
- if [ -n "$(gofmt -s -l .)" ]; then echo "gofmt the following files:"; gofmt -s -l .; exit 1; fi
- go vet ./...
- go test -v -race $PKGS # Run all the tests with the race detector enabled
Expand Down
247 changes: 247 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[[constraint]]
name = "cloud.google.com/go"
version = "0.21.0"

[[constraint]]
branch = "master"
name = "git.apache.org/thrift.git"
source = "github.com/apache/thrift"

[[constraint]]
name = "github.com/golang/protobuf"
version = "1.0.0"

[[constraint]]
name = "github.com/openzipkin/zipkin-go"
version = "0.1.0"

[[constraint]]
name = "github.com/prometheus/client_golang"
version = "0.8.0"

[[constraint]]
branch = "master"
name = "golang.org/x/net"

[[constraint]]
branch = "master"
name = "golang.org/x/oauth2"

[[constraint]]
branch = "master"
name = "google.golang.org/api"

[[constraint]]
branch = "master"
name = "google.golang.org/genproto"

[[constraint]]
name = "google.golang.org/grpc"
version = "1.11.3"

[prune]
go-tests = true
unused-packages = true

0 comments on commit c8f394d

Please sign in to comment.