diff --git a/Makefile b/Makefile index 0de702e6..6a274e55 100644 --- a/Makefile +++ b/Makefile @@ -101,24 +101,10 @@ fix: bin/golangci-lint ## Fix lint violations docker-image: @sudo docker build -t $(DOCKER_IMAGE) . -.PHONY: proto-old -proto-old: bin/protoc-old bin/protoc-gen-go-old - @./bin/protoc-old --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old api/v2/*.proto - @cp api/v2/*.proto api/ - @./bin/protoc-old --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old api/*.proto - .PHONY: verify-proto verify-proto: proto @./scripts/git-diff -bin/protoc-old: scripts/get-protoc - @./scripts/get-protoc bin/protoc-old - -bin/protoc-gen-go-old: - @mkdir -p tmp - @GOBIN=$$PWD/tmp go install -v github.com/golang/protobuf/protoc-gen-go@v1.3.2 - @mv tmp/protoc-gen-go bin/protoc-gen-go-old - clean: @rm -rf bin/ diff --git a/scripts/get-protoc b/scripts/get-protoc deleted file mode 100755 index 41b8f54a..00000000 --- a/scripts/get-protoc +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -e - -# This is a script to download protoc. Rather than depending on the version on -# a developer's machine, always download a specific version. - -VERSION="3.1.0" - -if [ $# -ne 1 ]; then - echo "Usage: ./get-protoc [dest]" - exit 2 -fi - -# Use the go tool to determine OS. -OS=$( go env GOOS ) - -if [ "$OS" = "darwin" ]; then - OS="osx" -fi - -mkdir -p bin - -# TODO(ericchiang): Architectures other than amd64? -ZIP="protoc-${VERSION}-${OS}-x86_64.zip" -URL="https://github.com/google/protobuf/releases/download/v${VERSION}/${ZIP}" - -wget ${URL} -# Unpack the protoc binary. Later we might want to grab additional data. -unzip -p ${ZIP} bin/protoc > $1 -chmod +x $1 -rm ${ZIP}