*: Switch to a Makefile driven develop/release process

* Add make targets for vendor, docker-image, and tools
* Move scripts into the scripts folder
This commit is contained in:
Dalton Hubble
2017-01-17 01:46:16 -08:00
parent b9d73c58ee
commit 219da4d934
13 changed files with 118 additions and 118 deletions

View File

@@ -1,21 +1,11 @@
#!/usr/bin/env bash
# USAGE ./scripts/codegen
# Generate Go protocol buffer code from proto definitions
set -eu
# Add tools to the PATH so binaries are the correct version
export PATH=$PWD/tools:$PATH
# Check location and tools
if ! [[ "$0" =~ "scripts/codegen" ]]; then
echo "must be run from repository root"
exit 255
fi
if ! [[ $(protoc --version) =~ "3.0.0" ]]; then
echo "could not find protoc 3.0.0"
exit 255
fi
# Add protoc and protoc-gen-go tools to PATH
export PATH=$PWD/bin:$PATH
# protobuf subpackages end in "pb"
PBUFS=$(go list ./... | grep -v /vendor | grep 'pb$')
@@ -28,4 +18,5 @@ for pkg in $PBUFS ; do
# generate protocol buffers, make other .proto files available to import
protoc --go_out=plugins=grpc:. -I=.:"${GOPATH}/src/" *.proto
popd > /dev/null
done
done