Paladox none | 1ea5f0e | 2016-12-10 16:08:48 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # This script will be run by bazel when the build process starts to |
| 4 | # generate key-value information that represents the status of the |
| 5 | # workspace. The output should be like |
| 6 | # |
| 7 | # KEY1 VALUE1 |
| 8 | # KEY2 VALUE2 |
| 9 | # |
| 10 | # If the script exits with non-zero code, it's considered as a failure |
| 11 | # and the output will be discarded. |
| 12 | |
| 13 | function rev() { |
| 14 | cd $1; git describe --always --match "v[0-9].*" --dirty |
| 15 | } |
| 16 | |
| 17 | echo "STABLE_BUILD_ITS-BASE_LABEL" $(rev .) |