2019-07-21 13:24:52 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-06-21 17:59:52 +00:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
function rev() {
|
|
|
|
cd $1; git describe --always --match "v[0-9].*" --dirty
|
|
|
|
}
|
|
|
|
|
|
|
|
echo STABLE_BUILD_GERRIT-OAUTH-PROVIDER_LABEL $(rev .)
|
2019-07-21 21:50:05 +00:00
|
|
|
echo STABLE_GIT_COMMIT $(git rev-parse HEAD)
|
|
|
|
echo STABLE_GIT_VERSION $(rev .)
|
|
|
|
echo STABLE_BUILDER $(id -un)@$(hostname -f):$(pwd)
|