Skip to content

Commit

Permalink
Prepare to run with upgraded protoc Docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Dec 29, 2023
1 parent 84e7b69 commit 6d725ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ cmd/tracegen/tracegen-*
crossdock/crossdock-*
run-crossdock.log
proto-gen/.patched-otel-proto/
proto-gen/.includes/
__pycache__
.asset-manifest.json
deploy/
Expand Down
15 changes: 12 additions & 3 deletions Makefile.Protobuf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# instead of the go_package's declared by the imported protof files.
#

DOCKER_PROTOBUF_VERSION=0.5.0
DOCKER_PROTOBUF_VERSION=v0.5.1rc
DOCKER_PROTOBUF=jaegertracing/protobuf:$(DOCKER_PROTOBUF_VERSION)
PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${DOCKER_PROTOBUF} --proto_path=${PWD}

Expand All @@ -24,6 +24,7 @@ PROTO_INCLUDES := \
-Iidl/proto/api_v2 \
-Iidl/proto/api_v3 \
-Imodel/proto/metrics \
-Iproto-gen/.includes \
-I/usr/include/github.com/gogo/protobuf

# Remapping of std types to gogo types (must not contain spaces)
Expand Down Expand Up @@ -77,9 +78,9 @@ define proto_compile

endef

# TODO add proto-hotrod to the list after regenerating its file (may need linter tweaking)
.PHONY: proto
proto: proto-model \
proto: proto-download-google-apis \
proto-model \
proto-api-v2 \
proto-storage-v1 \
proto-hotrod \
Expand All @@ -88,6 +89,14 @@ proto: proto-model \
proto-otel \
proto-api-v3

.PHONY: proto-download-google-apis
proto-download-google-apis:
mkdir -p ./proto-gen/.includes/google/api/
curl -sSL -o ./proto-gen/.includes/google/api/annotations.proto \
https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/annotations.proto
curl -sSL -o ./proto-gen/.includes/google/api/http.proto \
https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/http.proto

.PHONY: proto-model
proto-model:
$(call proto_compile, model, idl/proto/api_v2/model.proto)
Expand Down

0 comments on commit 6d725ea

Please sign in to comment.