diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-02-25 20:09:22 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-02-25 20:10:02 -0600 |
commit | 1e2a9d118a035762c32d5546a651a83f154e9663 (patch) | |
tree | e7b4327aa1dff468b488c50fb6daa49539756ba3 | |
parent | 8f68409eecb64ae6eadf8ae796336e303849aba1 (diff) |
tb: add a way to explicitly restrict a mode for a given branch
-rwxr-xr-x | tb/tb | 2 | ||||
-rw-r--r-- | tb/tb_internals.sh | 14 |
2 files changed, 16 insertions, 0 deletions
@@ -142,6 +142,8 @@ TB_BRANCH_LOCAL_REFSPEC=<ref> Name of the branche in the local repo Default to the name of the branch in the configuration This is a B-level only paramter This is a tb-mode only paramter. This is ingored in gerrit mode +TB_BRANCH_MODE=(gerrit|tb|both) Restrict the branch to gerrit build or tb build or both (default) + This is a B-level only parameter TB_BRANCH_REMOTE_REFSPEC=<ref> Name of the branch on the remote repo. Default to the name of the branch in the configuration This is a B-level only paramter diff --git a/tb/tb_internals.sh b/tb/tb_internals.sh index 07cf6fd..2e5090e 100644 --- a/tb/tb_internals.sh +++ b/tb/tb_internals.sh @@ -208,6 +208,13 @@ check_branch_profile_gerrit() source_branch_level_config "${b?}" "gerrit" + # if we intented that branch to be tb only let's bail-out early + if [ "$TB_BRANCH_MODE" = "tb" ] ; then + exit -1; + fi + + check_branch_profile_common + # if CCACHE_DIR is set it has been set by the branch's profile # if TB_CCACHE_SIZE is set make sure the cache is as big as specified # note: no need to restore the old CCACHE value @@ -237,6 +244,13 @@ check_branch_profile_tb() source_branch_level_config "${b?}" "tb" + # if we intented that branch to be gerrit only let's bail-out early + if [ "$TB_BRANCH_MODE" = "gerrit" ] ; then + exit -1; + fi + + check_branch_profile_common + if [ -z "${TB_TINDERBOX_BRANCH}" ] ; then TB_TINDERBOX_BRANCH=$(determine_default_tinderbox_branch "${b?}") # FIXME: determine if we can derive that value |