build: rename old proto download targets

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
Mark Sagi-Kazar 2021-03-22 18:28:15 +01:00
parent e3f8b0f2f6
commit 41712bcbfa
No known key found for this signature in database
GPG key ID: 34CC109EB5ED1C2A

View file

@ -90,21 +90,23 @@ docker-image:
@sudo docker build -t $(DOCKER_IMAGE) . @sudo docker build -t $(DOCKER_IMAGE) .
.PHONY: proto .PHONY: proto
proto: bin/protoc bin/protoc-gen-go proto: bin/protoc-old bin/protoc-gen-go-old
@./bin/protoc --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go api/v2/*.proto @./bin/protoc-old --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old api/v2/*.proto
@cp api/v2/*.proto api/ @cp api/v2/*.proto api/
@./bin/protoc --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go api/*.proto @./bin/protoc-old --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old api/*.proto
@./bin/protoc --go_out=. --plugin=protoc-gen-go=./bin/protoc-gen-go server/internal/*.proto @./bin/protoc-old --go_out=paths=source_relative:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old server/internal/*.proto
.PHONY: verify-proto .PHONY: verify-proto
verify-proto: proto verify-proto: proto
@./scripts/git-diff @./scripts/git-diff
bin/protoc: scripts/get-protoc bin/protoc-old: scripts/get-protoc
@./scripts/get-protoc bin/protoc @./scripts/get-protoc bin/protoc-old
bin/protoc-gen-go: bin/protoc-gen-go-old:
@go install -v github.com/golang/protobuf/protoc-gen-go @mkdir -p tmp
@GOBIN=$$PWD/tmp go install -v github.com/golang/protobuf/protoc-gen-go
@mv tmp/protoc-gen-go bin/protoc-gen-go-old
clean: clean:
@rm -rf bin/ @rm -rf bin/