Merge "Add additional documentation in metrics proto regen.sh script."

This commit is contained in:
Treehugger Robot 2020-10-13 04:20:29 +00:00 committed by Gerrit Code Review
commit 0807abacf3
1 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,17 @@
#!/bin/bash #!/bin/bash
aprotoc --go_out=paths=source_relative:. metrics.proto # Generates the golang source file of metrics.proto protobuf 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:. metrics.proto; then
die "build failed. ${error_msg}"
fi