Skip to content

Commit

Permalink
Deprecate the old custom option
Browse files Browse the repository at this point in the history
  • Loading branch information
yugui committed May 4, 2015
1 parent 5783729 commit 85ef5cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 77 deletions.
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ GATEWAY_PLUGIN_SRC= protoc-gen-grpc-gateway/descriptor/name.go \
protoc-gen-grpc-gateway/httprule/types_test.go \
protoc-gen-grpc-gateway/main.go

OLD_OPTIONS_PROTO=options/options.proto
OLD_OPTIONS_GO=$(OLD_OPTIONS_PROTO:.proto=.pb.go)
GOOGLEAPIS_DIR=third_party/googleapis
OPTIONS_PROTO=$(GOOGLEAPIS_DIR)/google/api/annotations.proto $(GOOGLEAPIS_DIR)/google/api/http.proto
OPTIONS_GO=$(OPTIONS_PROTO:.proto=.pb.go)
Expand All @@ -36,17 +34,14 @@ EXAMPLE_DEPS=examples/sub/message.proto
EXAMPLE_DEPSRCS=$(EXAMPLE_DEPS:.proto=.pb.go)
PROTOC_INC_PATH=$(dir $(shell which protoc))/../include

generate: $(OPTIONS_GO) $(OLD_OPTIONS_GO)
generate: $(OPTIONS_GO)

.SUFFIXES: .go .proto

$(GO_PLUGIN):
go get $(GO_PLUGIN_PKG)
go build -o $@ $(GO_PLUGIN_PKG)

$(OLD_OPTIONS_GO): $(OLD_OPTIONS_PROTO) $(GO_PLUGIN)
protoc -I $(PROTOC_INC_PATH) -I. --plugin=$(GO_PLUGIN) --go_out=$(PKGMAP):. $(OLD_OPTIONS_PROTO)

$(OPTIONS_GO): $(OPTIONS_PROTO) $(GO_PLUGIN)
protoc -I $(PROTOC_INC_PATH) -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --go_out=$(PKGMAP):$(GOOGLEAPIS_DIR) $(OPTIONS_PROTO)

Expand All @@ -65,6 +60,6 @@ test: $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_DEPSRCS)

clean distclean:
realclean:
rm -f $(OLD_OPTIONS_GO) $(OPTIONS_GO)
rm -f $(OPTIONS_GO)
rm -f $(EXAMPLE_SVCSRCS) $(EXAMPLE_DEPSRCS)
rm -f $(EXAMPLE_GWSRCS)
70 changes: 0 additions & 70 deletions options/options.pb.go

This file was deleted.

3 changes: 3 additions & 0 deletions options/options.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ package gengo.grpc.gateway;
import "google/protobuf/descriptor.proto";

message ApiMethodOptions {
// Use HttpRule instead.
option deprecated = true;

extend google.protobuf.MethodOptions {
// Describes how the gRPC method should be exported as a RESTful API.
//
Expand Down

0 comments on commit 85ef5cf

Please sign in to comment.