
bazel: generate the workspace version from the volatile status. To work across bazel 0.3.1 and 0.3.2, we should grep both volatile and stable status files for the magic version string. Change-Id: I48361374a8d9cda1e7a5b5db4e147bc49b4452a3
16 lines
430 B
Bash
Executable File
16 lines
430 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# This script will be run by bazel when the build process starts to
|
|
# generate key-value information that represents the status of the
|
|
# workspace. The output should be like
|
|
#
|
|
# KEY1 VALUE1
|
|
# KEY2 VALUE2
|
|
#
|
|
# If the script exits with non-zero code, it's considered as a failure
|
|
# and the output will be discarded.
|
|
|
|
git_rev=$(git describe --always --match "v[0-9].*" --dirty)
|
|
|
|
echo "STABLE_BUILD_GERRIT_LABEL ${git_rev}"
|