blob: 74d4dd510ee34443a0ccc7b25988640b4ffa5922 [file] [log] [blame]
David Burgerc33d1eb2020-01-21 14:24:50 -07001#!/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.
10CIPD_PROTOC_VERSION='v3.6.1'
11
12# Move to this script's directory.
13cd "$(dirname "$0")"
14
15# Get protobuf compiler from CIPD.
16cipd_root=.cipd_bin
17cipd ensure \
18 -log-level warning \
19 -root "${cipd_root}" \
20 -ensure-file - \
21 <<ENSURE_FILE
22infra/tools/protoc/\${platform} protobuf_version:${CIPD_PROTOC_VERSION}
23ENSURE_FILE
24
25PATH="${cipd_root}:${PATH}"
26
27protoc -I../../ --descriptor_set_out=proto/descpb.bin \
28 --include_imports \
29 src/config/api/component.proto \
C Shapiro6c587362020-01-23 09:37:11 -060030 src/config/api/design.proto \
C Shapiro76d21ac2020-01-23 10:06:40 -060031 src/config/api/device_brand.proto \
C Shapiro61970662020-01-23 13:12:42 -060032 src/config/api/partner.proto \
33 src/config/api/program.proto