platform_build_soong/ui/metrics/upload_proto/regen.sh
Patrice Arruda adfc1120b9 Add a new protobuf message named Upload to upload build metrics.
A new protobuf message named Upload is defined to send build metrics
to the Android Build Server API after a build is completed. These
metrics are collected from googlers only, as described in
go/local-developers-metrics-wfh.

Bug: b/140638454
Test: m nothing
Change-Id: I5e49b5ace053913be2b75673cb1375f4cef37825
2020-04-16 14:02:56 -07:00

17 lines
412 B
Bash
Executable file

#!/bin/bash
# Generates the golang source file of upload.proto file.
set -e
function die() { echo "ERROR: $1" >&2; exit 1; }
readonly error_msg="Maybe you need to run 'lunch aosp_arm-eng && m aprotoc blueprint_tools'?"
if ! hash aprotoc &>/dev/null; then
die "could not find aprotoc. ${error_msg}"
fi
if ! aprotoc --go_out=paths=source_relative:. upload.proto; then
die "build failed. ${error_msg}"
fi