From ba4aa98cc2cb5fe3286d1132fb052649c9e79f1e Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Mon, 10 Feb 2020 14:49:39 +0300 Subject: [PATCH] Refactoring Makefile --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 43f4642..a20243e 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,6 @@ deps: @go mod vendor @echo "${B}${G}=> Cleanup old files ${R}" - @find . -type f -name '*.pb.go' -not -path './vendor/*' -exec rm {} \; @find . -type f -name '*.proto' -not -path './vendor/*' -not -name '*_test.proto' -exec rm {} \; @echo "${B}${G}=> NeoFS Proto files ${R}" @@ -49,6 +48,9 @@ docgen: deps # Regenerate proto files: protoc: deps + @echo "${B}${G}=> Cleanup old files ${R}" + @find . -type f -name '*.pb.go' -not -path './vendor/*' -exec rm {} \; + @echo "${B}${G}=> Install specific version for gogo-proto ${R}" @go list -f '{{.Path}}/...@{{.Version}}' -m github.com/gogo/protobuf | xargs go get -v @echo "${B}${G}=> Install specific version for protobuf lib ${R}" @@ -60,3 +62,5 @@ protoc: deps --proto_path=.:./vendor:/usr/local/include \ --gofast_out=plugins=grpc,paths=source_relative:. $$f; \ done + +update: docgen protoc