David Burger | c33d1eb | 2020-01-21 14:24:50 -0700 | [diff] [blame] | 1 | #!/bin/bash -e |
| 2 | # |
| 3 | # Copyright 2020 The Chromium OS Authors. All rights reserved. |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | # |
| 7 | # Runs protoc over the configuration protos to produce generated proto code. |
| 8 | |
| 9 | # Versions of packages to get from CIPD. |
| 10 | CIPD_PROTOC_VERSION='v3.6.1' |
| 11 | |
| 12 | # Move to this script's directory. |
| 13 | cd "$(dirname "$0")" |
| 14 | |
| 15 | # Get protobuf compiler from CIPD. |
| 16 | cipd_root=.cipd_bin |
| 17 | cipd ensure \ |
| 18 | -log-level warning \ |
| 19 | -root "${cipd_root}" \ |
| 20 | -ensure-file - \ |
| 21 | <<ENSURE_FILE |
| 22 | infra/tools/protoc/\${platform} protobuf_version:${CIPD_PROTOC_VERSION} |
| 23 | ENSURE_FILE |
| 24 | |
| 25 | PATH="${cipd_root}:${PATH}" |
| 26 | |
| 27 | protoc -I../../ --descriptor_set_out=proto/descpb.bin \ |
| 28 | --include_imports \ |
| 29 | src/config/api/component.proto \ |
C Shapiro | 6c58736 | 2020-01-23 09:37:11 -0600 | [diff] [blame] | 30 | src/config/api/design.proto \ |
C Shapiro | 76d21ac | 2020-01-23 10:06:40 -0600 | [diff] [blame] | 31 | src/config/api/device_brand.proto \ |
C Shapiro | 6197066 | 2020-01-23 13:12:42 -0600 | [diff] [blame^] | 32 | src/config/api/partner.proto \ |
| 33 | src/config/api/program.proto |