forked from gogo/googleapis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (48 loc) · 1.87 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
URL="https://raw.githubusercontent.com/googleapis/googleapis/master/"
test:
go test ./...
regenerate:
go install github.com/gogo/googleapis/protoc-gen-gogogoogleapis
protoc \
--gogogoogleapis_out=\
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\
:. \
-I=. \
google/rpc/status.proto \
google/rpc/error_details.proto \
google/rpc/code.proto \
protoc \
--gogogoogleapis_out=\
Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,\
:. \
-I=. \
google/api/http.proto \
google/api/annotations.proto
update:
go install github.com/gogo/protobuf/gogoreplace
(cd ./google/rpc && rm status.proto; wget ${URL}/google/rpc/status.proto)
gogoreplace \
'option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";' \
'option go_package = "rpc";' \
./google/rpc/status.proto
(cd ./google/rpc && rm error_details.proto; wget ${URL}/google/rpc/error_details.proto)
gogoreplace \
'option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails";' \
'option go_package = "rpc";' \
./google/rpc/error_details.proto
(cd ./google/rpc && rm code.proto; wget ${URL}/google/rpc/code.proto)
gogoreplace \
'option go_package = "google.golang.org/genproto/googleapis/rpc/code;code";' \
'option go_package = "rpc";' \
./google/rpc/code.proto
(cd ./google/api && rm http.proto; wget ${URL}/google/api/http.proto)
gogoreplace \
'option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";' \
'option go_package = "api";' \
./google/api/http.proto
(cd ./google/api && rm annotations.proto; wget ${URL}/google/api/annotations.proto)
gogoreplace \
'option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";' \
'option go_package = "api";' \
./google/api/annotations.proto