Skip to content

Commit

Permalink
remove flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Boten committed Mar 7, 2022
1 parent 6ceffe1 commit 5a13dd2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ gen-all: gen-cpp gen-csharp gen-go gen-java gen-kotlin gen-objc gen-openapi gen-

OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0
PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD}
PROTO_FLAGS := --experimental_allow_proto3_optional

PROTO_GEN_CPP_DIR ?= $(GENDIR)/cpp
PROTO_GEN_CSHARP_DIR ?= $(GENDIR)/csharp
Expand All @@ -43,7 +42,7 @@ docker-pull:
gen-cpp:
rm -rf ./$(PROTO_GEN_CPP_DIR)
mkdir -p ./$(PROTO_GEN_CPP_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) $(PROTO_FLAGS) --cpp_out=./$(PROTO_GEN_CPP_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) --cpp_out=./$(PROTO_GEN_CPP_DIR) $(file)))
$(PROTOC) $(PROTO_FLAGS) --cpp_out=./$(PROTO_GEN_CPP_DIR) --grpc-cpp_out=./$(PROTO_GEN_CPP_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto
$(PROTOC) $(PROTO_FLAGS) --cpp_out=./$(PROTO_GEN_CPP_DIR) --grpc-cpp_out=./$(PROTO_GEN_CPP_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
$(PROTOC) $(PROTO_FLAGS) --cpp_out=./$(PROTO_GEN_CPP_DIR) --grpc-cpp_out=./$(PROTO_GEN_CPP_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto
Expand All @@ -53,7 +52,7 @@ gen-cpp:
gen-csharp:
rm -rf ./$(PROTO_GEN_CSHARP_DIR)
mkdir -p ./$(PROTO_GEN_CSHARP_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) $(PROTO_FLAGS) --csharp_out=./$(PROTO_GEN_CSHARP_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) --csharp_out=./$(PROTO_GEN_CSHARP_DIR) $(file)))
$(PROTOC) $(PROTO_FLAGS) --csharp_out=./$(PROTO_GEN_CSHARP_DIR) --grpc-csharp_out=./$(PROTO_GEN_CSHARP_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto
$(PROTOC) $(PROTO_FLAGS) --csharp_out=./$(PROTO_GEN_CSHARP_DIR) --grpc-csharp_out=./$(PROTO_GEN_CSHARP_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
$(PROTOC) $(PROTO_FLAGS) --csharp_out=./$(PROTO_GEN_CSHARP_DIR) --grpc-csharp_out=./$(PROTO_GEN_CSHARP_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto
Expand All @@ -63,7 +62,7 @@ gen-csharp:
gen-go:
rm -rf ./$(PROTO_GEN_GO_DIR)
mkdir -p ./$(PROTO_GEN_GO_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command,$(PROTOC) $(PROTO_FLAGS) --go_out=plugins=grpc:./$(PROTO_GEN_GO_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command,$(PROTOC) --go_out=plugins=grpc:./$(PROTO_GEN_GO_DIR) $(file)))
$(PROTOC) $(PROTO_FLAGS) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/trace/v1/trace_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto
$(PROTOC) $(PROTO_FLAGS) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/metrics/v1/metrics_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
$(PROTOC) $(PROTO_FLAGS) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/logs/v1/logs_service_http.yaml:./$(PROTO_GEN_GO_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto
Expand All @@ -73,7 +72,7 @@ gen-go:
gen-java:
rm -rf ./$(PROTO_GEN_JAVA_DIR)
mkdir -p ./$(PROTO_GEN_JAVA_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) $(PROTO_FLAGS) --java_out=./$(PROTO_GEN_JAVA_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) --java_out=./$(PROTO_GEN_JAVA_DIR) $(file)))

# Generate gRPC/Protobuf implementation for Kotlin.
.PHONY: gen-kotlin
Expand All @@ -88,7 +87,7 @@ gen-kotlin: gen-java
gen-js:
rm -rf ./$(PROTO_GEN_JS_DIR)
mkdir -p ./$(PROTO_GEN_JS_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) $(PROTO_FLAGS) --js_out=import_style=commonjs:./$(PROTO_GEN_JS_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) --js_out=import_style=commonjs:./$(PROTO_GEN_JS_DIR) $(file)))
$(PROTOC) $(PROTO_FLAGS) --js_out=import_style=commonjs:./$(PROTO_GEN_JS_DIR) --grpc-web_out=import_style=commonjs,mode=grpcweb:./$(PROTO_GEN_JS_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto
$(PROTOC) $(PROTO_FLAGS) --js_out=import_style=commonjs:./$(PROTO_GEN_JS_DIR) --grpc-web_out=import_style=commonjs,mode=grpcweb:./$(PROTO_GEN_JS_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
$(PROTOC) $(PROTO_FLAGS) --js_out=import_style=commonjs:./$(PROTO_GEN_JS_DIR) --grpc-web_out=import_style=commonjs,mode=grpcweb:./$(PROTO_GEN_JS_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto
Expand All @@ -98,7 +97,7 @@ gen-js:
gen-objc:
rm -rf ./$(PROTO_GEN_OBJC_DIR)
mkdir -p ./$(PROTO_GEN_OBJC_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) $(PROTO_FLAGS) --objc_out=./$(PROTO_GEN_OBJC_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) --objc_out=./$(PROTO_GEN_OBJC_DIR) $(file)))
$(PROTOC) $(PROTO_FLAGS) --objc_out=./$(PROTO_GEN_OBJC_DIR) --grpc-objc_out=./$(PROTO_GEN_OBJC_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto
$(PROTOC) $(PROTO_FLAGS) --objc_out=./$(PROTO_GEN_OBJC_DIR) --grpc-objc_out=./$(PROTO_GEN_OBJC_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
$(PROTOC) $(PROTO_FLAGS) --objc_out=./$(PROTO_GEN_OBJC_DIR) --grpc-objc_out=./$(PROTO_GEN_OBJC_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto
Expand All @@ -116,7 +115,7 @@ gen-openapi:
gen-php:
rm -rf ./$(PROTO_GEN_PHP_DIR)
mkdir -p ./$(PROTO_GEN_PHP_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) $(PROTO_FLAGS) --php_out=./$(PROTO_GEN_PHP_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) --php_out=./$(PROTO_GEN_PHP_DIR) $(file)))
$(PROTOC) $(PROTO_FLAGS) --php_out=./$(PROTO_GEN_PHP_DIR) --grpc-php_out=./$(PROTO_GEN_PHP_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto
$(PROTOC) $(PROTO_FLAGS) --php_out=./$(PROTO_GEN_PHP_DIR) --grpc-php_out=./$(PROTO_GEN_PHP_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
$(PROTOC) $(PROTO_FLAGS) --php_out=./$(PROTO_GEN_PHP_DIR) --grpc-php_out=./$(PROTO_GEN_PHP_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto
Expand All @@ -126,7 +125,7 @@ gen-php:
gen-python:
rm -rf ./$(PROTO_GEN_PYTHON_DIR)
mkdir -p ./$(PROTO_GEN_PYTHON_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) $(PROTO_FLAGS) --python_out=./$(PROTO_GEN_PYTHON_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) --python_out=./$(PROTO_GEN_PYTHON_DIR) $(file)))
$(PROTOC) $(PROTO_FLAGS) --python_out=./$(PROTO_GEN_PYTHON_DIR) --grpc-python_out=./$(PROTO_GEN_PYTHON_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto
$(PROTOC) $(PROTO_FLAGS) --python_out=./$(PROTO_GEN_PYTHON_DIR) --grpc-python_out=./$(PROTO_GEN_PYTHON_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
$(PROTOC) $(PROTO_FLAGS) --python_out=./$(PROTO_GEN_PYTHON_DIR) --grpc-python_out=./$(PROTO_GEN_PYTHON_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto
Expand All @@ -136,7 +135,7 @@ gen-python:
gen-ruby:
rm -rf ./$(PROTO_GEN_RUBY_DIR)
mkdir -p ./$(PROTO_GEN_RUBY_DIR)
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) $(PROTO_FLAGS) --ruby_out=./$(PROTO_GEN_RUBY_DIR) $(file)))
$(foreach file,$(PROTO_FILES),$(call exec-command, $(PROTOC) --ruby_out=./$(PROTO_GEN_RUBY_DIR) $(file)))
$(PROTOC) $(PROTO_FLAGS) --ruby_out=./$(PROTO_GEN_RUBY_DIR) --grpc-ruby_out=./$(PROTO_GEN_RUBY_DIR) opentelemetry/proto/collector/trace/v1/trace_service.proto
$(PROTOC) $(PROTO_FLAGS) --ruby_out=./$(PROTO_GEN_RUBY_DIR) --grpc-ruby_out=./$(PROTO_GEN_RUBY_DIR) opentelemetry/proto/collector/metrics/v1/metrics_service.proto
$(PROTOC) $(PROTO_FLAGS) --ruby_out=./$(PROTO_GEN_RUBY_DIR) --grpc-ruby_out=./$(PROTO_GEN_RUBY_DIR) opentelemetry/proto/collector/logs/v1/logs_service.proto

0 comments on commit 5a13dd2

Please sign in to comment.