diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-01-11 03:56:13 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-01-11 03:56:13 -0600 |
commit | 3a55951b64bd3c3e8d81192bc593d5b1e5bf0d90 (patch) | |
tree | cd233ac655b2b0a53702132f974ebe3092521f96 | |
parent | d9bbd78b7c2d5dca47c712052f6356b065b1f2a8 (diff) |
tb2: in gerrit related mode of operation, make sure TINDER_ID is set
-rwxr-xr-x | bin/tinbuild2 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/tinbuild2 b/bin/tinbuild2 index 8583c8d..57d2a6c 100755 --- a/bin/tinbuild2 +++ b/bin/tinbuild2 @@ -440,6 +440,32 @@ if [ "${PUSH_TO_BIBISECT_REPO}" != "0" ] ; then fi fi fi + +if [ "$MODE" = "gerrit-tb" -o "$MODE" = "tb-gerrit" -o "$MODE" = "gerrit" -o "$MODE" = "fair" ] ; then + if [ -z "$GERRIT_PLATFORM" ] ; then + os=$(uname) + case "$os" in + *Linux*) + GERRIT_PLATFORM="LINUX" + ;; + Darwin) + GERRIT_PLATFORM="MAC" + ;; + CYGWIN*) + GERRIT_PLATFORM="WINDOWS" + ;; + esac + fi + if [ -z "$GERRIT_PLATFORM" ] ; then + echo "Error: GERRIT_PLATFORM is required for mode involving gerrit" + exit 1 + fi + if [ -z "$TINDER_ID" ] ; then + echo "Error: TINDER_ID is required for mode involving gerrit" + exit 1 + fi +fi + # if we want email to be sent, we must make sure that the required parameters are set in the profile (or in the environment) case "$SEND_MAIL" in all|tb|owner|debug|author) |