Add deps & protoc to makefile
Took 11 minutes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
.PHONY: build
|
||||
|
||||
SPEC=$(GOPATH)/bin/spec
|
||||
PROTOC=$(GOPATH)/bin/protoc-gen-go
|
||||
|
||||
build:
|
||||
docker build --rm -t $(shell cat .project) .
|
||||
@@ -8,6 +9,19 @@ build:
|
||||
$(SPEC):
|
||||
go get github.com/titpetric/spec/cmd/spec
|
||||
|
||||
$(PROTOC):
|
||||
go get -u github.com/golang/protobuf/protoc-gen-go
|
||||
|
||||
spec: $(SPEC)
|
||||
cd sam/docs/src && $(SPEC)
|
||||
cd sam/ && php _gen.php
|
||||
|
||||
protobuf: $(PROTOC)
|
||||
# @todo this needs work (it hangs and outputs nothing)
|
||||
$(PROTOC) --go_out=plugins=grpc:. -I. sam/chat/*.proto
|
||||
|
||||
dep:
|
||||
dep ensure -v
|
||||
|
||||
dep.update:
|
||||
dep ensure -update -v
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
PROJECT=$(<.project)
|
||||
|
||||
if [ -d "vendor" ]; then
|
||||
docker run --rm -v $(pwd):/go/src/github.com/$PROJECT -w /go/src/github.com/$PROJECT -e GOOS=${OS} -e GOARCH=${ARCH} -e CGO_ENABLED=0 -e GOARM=7 titpetric/golang dep ensure -update -v
|
||||
else
|
||||
docker run --rm -v $(pwd):/go/src/github.com/$PROJECT -w /go/src/github.com/$PROJECT -e GOOS=${OS} -e GOARCH=${ARCH} -e CGO_ENABLED=0 -e GOARM=7 titpetric/golang dep init
|
||||
fi
|
||||
Reference in New Issue
Block a user