From 36071b3a79170441b339802321117aaf28d2df3d Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Wed, 11 Jan 2023 14:15:20 +0300 Subject: [PATCH] build deps locally --- Makefile | 17 +++++++++++------ deps/.gitignore | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 deps/.gitignore diff --git a/Makefile b/Makefile index 53988ac1..140356d4 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,20 @@ -.PHONY: proto test test-coverage vet +.PHONY: proto test test-coverage vet deps export GOPRIVATE=github.com/anytypeio +export PATH:=deps:$(PATH) proto: @echo 'Generating protobuf packages (Go)...' - @$(eval GOGO_START := GOGO_NO_UNDERSCORE=1 GOGO_EXPORT_ONEOF_INTERFACE=1) @$(eval P_ACL_RECORDS_PATH_PB := commonspace/object/acl/aclrecordproto) @$(eval P_TREE_CHANGES_PATH_PB := commonspace/object/tree/treechangeproto) @$(eval P_ACL_RECORDS := M$(P_ACL_RECORDS_PATH_PB)/protos/aclrecord.proto=github.com/anytypeio/any-sync/$(P_ACL_RECORDS_PATH_PB)) @$(eval P_TREE_CHANGES := M$(P_TREE_CHANGES_PATH_PB)/protos/treechange.proto=github.com/anytypeio/any-sync/$(P_TREE_CHANGES_PATH_PB)) - $(GOGO_START) protoc --gogofaster_out=:. $(P_ACL_RECORDS_PATH_PB)/protos/*.proto - $(GOGO_START) protoc --gogofaster_out=:. $(P_TREE_CHANGES_PATH_PB)/protos/*.proto + protoc --gogofaster_out=:. $(P_ACL_RECORDS_PATH_PB)/protos/*.proto + protoc --gogofaster_out=:. $(P_TREE_CHANGES_PATH_PB)/protos/*.proto $(eval PKGMAP := $$(P_TREE_CHANGES),$$(P_ACL_RECORDS)) - $(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonspace/spacesyncproto/protos/*.proto - $(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto + protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonspace/spacesyncproto/protos/*.proto + protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto vet: go vet ./... @@ -25,3 +25,8 @@ test: test-coverage: go test ./... -coverprofile coverage.out -covermode count go tool cover -func coverage.out + +deps: + go mod download + go build -o deps storj.io/drpc/cmd/protoc-gen-go-drpc + go build -o deps github.com/gogo/protobuf/protoc-gen-gogofaster diff --git a/deps/.gitignore b/deps/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/deps/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore