Skip to content

Commit

Permalink
migrating from glide to go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Burnett committed Jul 6, 2020
1 parent 823d49f commit 2065c0e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PKG := $(shell go list .)
PKGS := $(shell go list ./...)

.PHONY: bootstrap
bootstrap: vendor testdata # set up the project for development
bootstrap: testdata # set up the project for development

.PHONY: lint
lint: # lints the package for common code smells
Expand All @@ -20,11 +20,11 @@ quick: vendor testdata # runs all tests without the race detector or coverage
go test $(PKGS)

.PHONY: tests
tests: vendor testdata # runs all tests against the package with race detection and coverage percentage
tests: testdata # runs all tests against the package with race detection and coverage percentage
go test -race -cover $(PKGS)

.PHONY: cover
cover: vendor testdata # runs all tests against the package, generating a coverage report and opening it in the browser
cover: testdata # runs all tests against the package, generating a coverage report and opening it in the browser
go test -race -covermode=atomic -coverprofile=cover.out $(PKGS) || true
go tool cover -html cover.out -o cover.html
open cover.html
Expand Down Expand Up @@ -78,23 +78,18 @@ testdata-go: protoc-gen-go bin/protoc-gen-debug # generate go-specific testdata
testdata-packages \
testdata-outputs

vendor: # install project dependencies
which glide || (curl https://glide.sh/get | sh)
glide install

.PHONY: protoc-gen-go
protoc-gen-go:
which protoc-gen-go || (go get -u github.com/golang/protobuf/protoc-gen-go)

bin/protoc-gen-example: vendor # creates the demo protoc plugin for demonstrating uses of PG*
bin/protoc-gen-example: # creates the demo protoc plugin for demonstrating uses of PG*
go build -o ./bin/protoc-gen-example ./testdata/protoc-gen-example

bin/protoc-gen-debug: vendor # creates the protoc-gen-debug protoc plugin for output ProtoGeneratorRequest messages
bin/protoc-gen-debug: # creates the protoc-gen-debug protoc plugin for output ProtoGeneratorRequest messages
go build -o ./bin/protoc-gen-debug ./protoc-gen-debug

.PHONY: clean
clean:
rm -rf vendor
rm -rf bin
rm -rf testdata/generated
set -e; for f in `find . -name *.pb.bin`; do \
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module github.com/lyft/protoc-gen-star

go 1.14

require (
github.com/golang/protobuf v1.1.0
github.com/spf13/afero v1.2.1
github.com/stretchr/testify v1.6.1
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 // indirect
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db // indirect
)
21 changes: 21 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc=
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/spf13/afero v1.2.1 h1:qgMbHoJbPbw579P+1zVY+6n4nIFuIchaIjzZ/I/Yq8M=
github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db h1:6/JqlYfC1CCaLnGceQTI+sDGhC9UBSPAsBqI0Gun6kU=
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 2065c0e

Please sign in to comment.