gerrit/tools/workspace-status.sh
David Ostrovsky 1ce5c47079 Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Split up the git acceptance tests
  Set the workspace root through a JVM property sourceRoot
  Document how to use RBE for the gerrit build

Change-Id: Ia25eb698dea8325f1b4f0ac87fe43eb04a2e423f
2019-05-18 10:25:54 +02:00

22 lines
604 B
Bash
Executable File

#!/usr/bin/env bash
# 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_LABEL $(rev .)
for p in plugins/* ; do
test -d "$p" || continue
echo STABLE_BUILD_$(echo $(basename $p)_LABEL|tr '[a-z]' '[A-Z]' ) $(rev $p || echo unknown)
done