blob: 0335239f5532b9e09bb6c62a438bf37646a3ebcf [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 \
30 src/config/api/partner.proto