summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-01-18 19:37:42 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-01-18 19:39:29 -0600
commite40e614bf997048cca0d6f4fc424171296ca0d60 (patch)
treeb29bbd54926bc1998e3ca13b544e84fde70fd4a7
parentfb4bfe229fe8697578c320cf2e80c3703dca4239 (diff)
tb: try to gues the tinderbox-server branch name to use
-rw-r--r--tb/tb_internals.sh34
1 files changed, 32 insertions, 2 deletions
diff --git a/tb/tb_internals.sh b/tb/tb_internals.sh
index b3225d9..fb01ce5 100644
--- a/tb/tb_internals.sh
+++ b/tb/tb_internals.sh
@@ -233,10 +233,13 @@ check_branch_profile_tb()
source_branch_level_config "${b?}" "tb"
- if [ -z "${TB_TINDERBOX_BRANCH}" ; then
+ if [ -z "${TB_TINDERBOX_BRANCH}" ] ; then
+ TB_TINDERBOX_BRANCH=$(determine_default_tinderbox_branch "${b?}")
# FIXME: determine if we can derive that value
# from ${b}
- die "Missing TB_TINDERBOX_BRANCH to associate a BRANCH name on the tiderbox server to the branch ${b?}"
+ if [ -z "${TB_TINDERBOX_BRANCH}" ] ; then
+ die "Missing TB_TINDERBOX_BRANCH to associate a BRANCH name on the tiderbox server to the branch ${b?}"
+ fi
fi
if [ "${TB_BIBISECT}" == "1" ] ; then
@@ -444,6 +447,29 @@ deliver_to_bibisect()
[ $V ] && echo "unlock ${lock_file?}.bibisect"
}
+
+determine_default_tinderbox_branch()
+{
+ local b="$1"
+
+ case "$b" in
+ master)
+ echo 'MASTER'
+ ;;
+ libreoffice-3-4)
+ echo "${b?}"
+ ;;
+ libreoffice-3-5)
+ echo "${b?}"
+ ;;
+ libreoffice-3-6)
+ echo "${b?}"
+ ;;
+ libreoffice-4-0)
+ echo "${b?}"
+ ;;
+ esac
+}
#
# Find a gnu make
#
@@ -1425,6 +1451,10 @@ source_branch_level_config()
if [ -f "${tb_PROFILE_DIR?}/branches/${b?}/config_${t?}" ] ; then
source "${tb_PROFILE_DIR?}/branches/${b?}/config_${t?}"
fi
+ # we have verified the branch before so that should work
+ if [ -z "${TB_TINDERBOX_BRANCH}" ] ; then
+ TB_TINDERBOX_BRANCH=$(determine_default_tinderbox_branch "${b?}")
+ fi
}
#