feedback
This commit is contained in:
parent
e9c5d2433c
commit
ad8115c327
4
Makefile
4
Makefile
|
|
@ -2,6 +2,8 @@ dev_build_version=$(shell git describe --tags --always --dirty)
|
||||||
|
|
||||||
export PATH := $(shell pwd)/.tmp/protoc/bin:$(PATH)
|
export PATH := $(shell pwd)/.tmp/protoc/bin:$(PATH)
|
||||||
|
|
||||||
|
export PROTOC_VERSION := 22.0
|
||||||
|
|
||||||
# TODO: run golint and errcheck, but only to catch *new* violations and
|
# TODO: run golint and errcheck, but only to catch *new* violations and
|
||||||
# decide whether to change code or not (e.g. we need to be able to whitelist
|
# decide whether to change code or not (e.g. we need to be able to whitelist
|
||||||
# violations already in the code). They can be useful to catch errors, but
|
# violations already in the code). They can be useful to catch errors, but
|
||||||
|
|
@ -88,6 +90,6 @@ errcheck:
|
||||||
test:
|
test:
|
||||||
go test -race ./...
|
go test -race ./...
|
||||||
|
|
||||||
.tmp/protoc/bin/protoc:
|
.tmp/protoc/bin/protoc: ./Makefile ./download_protoc.sh
|
||||||
./download_protoc.sh
|
./download_protoc.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,10 @@ set -e
|
||||||
|
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
PROTOC_VERSION="22.0"
|
if [[ -z "$PROTOC_VERSION" ]]; then
|
||||||
|
echo "Set PROTOC_VERSION env var to indicate the version to download" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
PROTOC_OS="$(uname -s)"
|
PROTOC_OS="$(uname -s)"
|
||||||
PROTOC_ARCH="$(uname -m)"
|
PROTOC_ARCH="$(uname -m)"
|
||||||
case "${PROTOC_OS}" in
|
case "${PROTOC_OS}" in
|
||||||
|
|
@ -27,6 +30,6 @@ if [[ "$(${PROTOC} --version 2>/dev/null)" != "libprotoc 3.${PROTOC_VERSION}" ]]
|
||||||
rm -rf ./.tmp/protoc
|
rm -rf ./.tmp/protoc
|
||||||
mkdir -p .tmp/protoc
|
mkdir -p .tmp/protoc
|
||||||
curl -L "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-${PROTOC_OS}-${PROTOC_ARCH}.zip" > .tmp/protoc/protoc.zip
|
curl -L "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-${PROTOC_OS}-${PROTOC_ARCH}.zip" > .tmp/protoc/protoc.zip
|
||||||
cd ./.tmp/protoc && unzip protoc.zip && cd ..
|
pushd ./.tmp/protoc && unzip protoc.zip && popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue