This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
COMPILE-PROTOS.sh
executable file
·75 lines (67 loc) · 3.15 KB
/
COMPILE-PROTOS.sh
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
#
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Compile .proto files into the files needed to build the registry library.
#
# This points to the .proto files distributed with protoc.
export PROTOC="/usr/local/include"
# This is a third_party directory containing .proto files used by many APIs.
export COMMON="third_party/api-common-protos"
# This is a third_party directory containing the Registry API protos.
export REGISTRY="third_party/registry"
# This is a third_party directory containing message protos used to store API metrics.
export GNOSTIC="third_party/gnostic"
# This is a directory containing project-specific protos.
export PROTOS="."
mkdir -p registry/lib/src/generated
echo "Generating Dart support code."
protoc \
--proto_path=${PROTOC} \
--proto_path=${COMMON} \
--proto_path=${REGISTRY} \
--proto_path=${GNOSTIC} \
--proto_path=${PROTOS} \
${PROTOC}/google/protobuf/any.proto \
${PROTOC}/google/protobuf/timestamp.proto \
${PROTOC}/google/protobuf/field_mask.proto \
${PROTOC}/google/protobuf/empty.proto \
${PROTOC}/google/protobuf/duration.proto \
${COMMON}/google/api/httpbody.proto \
${COMMON}/google/longrunning/operations.proto \
${COMMON}/google/rpc/status.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/registry_models.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/registry_service.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/admin_models.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/admin_service.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/apihub/display_settings.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/apihub/extensions.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/apihub/fields.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/apihub/lifecycle.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/apihub/references.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/apihub/taxonomies.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/controller/manifest.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/controller/receipt.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/scoring/definition.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/scoring/score_card.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/scoring/score.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/scoring/severity.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/style/conformance_report.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/style/lint.proto \
${REGISTRY}/google/cloud/apigeeregistry/v1/style/style_guide.proto \
${GNOSTIC}/metrics/complexity.proto \
${GNOSTIC}/metrics/vocabulary.proto \
--dart_out=grpc:registry/lib/src/generated