Skip to content

Commit 5dd2fa5

Browse files
authored
Support make protos on Mac (feast-dev#1371)
Signed-off-by: ted chang <[email protected]>
1 parent 9311038 commit 5dd2fa5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
1818
PROTO_TYPE_SUBDIRS = core serving types storage
1919
PROTO_SERVICE_SUBDIRS = core serving
20+
OS := linux
21+
ifeq ($(shell uname -s), Darwin)
22+
OS = osx
23+
endif
2024

2125
# General
2226

@@ -113,14 +117,16 @@ install-dependencies-proto-docs:
113117
cd tools/cmd/protoc-gen-docs && \
114118
go build && \
115119
cp protoc-gen-docs $$HOME/bin && \
116-
cd $$HOME && curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.11.2/protoc-3.11.2-linux-x86_64.zip && \
117-
unzip protoc-3.11.2-linux-x86_64.zip -d protoc3 && \
120+
cd $$HOME && curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.11.2/protoc-3.11.2-${OS}-x86_64.zip && \
121+
unzip protoc-3.11.2-${OS}-x86_64.zip -d protoc3 && \
118122
mv protoc3/bin/* $$HOME/bin/ && \
119123
chmod +x $$HOME/bin/protoc && \
120124
mv protoc3/include/* $$HOME/include
121125

122126
compile-protos-docs:
123-
cd ${ROOT_DIR}/protos; protoc --docs_out=../dist/grpc feast/*/*.proto || \
127+
cd ${ROOT_DIR}/protos;
128+
mkdir -p ../dist/grpc
129+
protoc --docs_out=../dist/grpc feast/*/*.proto || \
124130
cd ${ROOT_DIR}; $(MAKE) install-dependencies-proto-docs && cd ${ROOT_DIR}/protos; PATH=$$HOME/bin:$$PATH protoc -I $$HOME/include/ -I . --docs_out=../dist/grpc feast/*/*.proto
125131

126132
clean-html:

0 commit comments

Comments
 (0)