summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--round-robin.sh23
1 files changed, 7 insertions, 16 deletions
diff --git a/round-robin.sh b/round-robin.sh
index 1fdd27de..bd3d886f 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -123,24 +123,15 @@ clone_repo ()
fi
local branch
- # Select the branch to build.
- # ${rr[current_branch]} specifies branch for ${rr[current_project]},
- # and everything else uses baseline branch.
- if [ x"$project" = x"${rr[current_project]}" ]; then
- # Use the tip of the branch tracked in the current configuration.
- if [ x"${rr[current_branch]}" = x"default" ]; then
- branch=${rr[${rr[current_project]}_branch]}
- elif [ x"${rr[current_branch]}" = x"baseline" ]; then
- branch="refs/remotes/baseline/${rr[baseline_branch]}"
- else
- branch=${rr[current_branch]}
- fi
- elif ${rr[init_configuration]-false}; then
- branch="${rr[${project}_branch]}"
- else
+
+ # Resolve "baseline" branch specifier.
+ if [ x"${rr[${project}_branch]}" = x"baseline" ]; then
branch="refs/remotes/baseline/${rr[baseline_branch]}"
+ else
+ branch="${rr[${project}_branch]}"
fi
+ # Allow manifest override
branch="${rr[${project}_rev]-$branch}"
# Decide on whether to use read-only or read-write mode for
@@ -148,7 +139,7 @@ clone_repo ()
# developers without ssh keys on Linaro git servers to reproduce builds
# in --mode "baseline".
local read_only="true"
- if [ x"$project" = x"${rr[current_project]}" -a \
+ if [ x"${rr[${project}_branch]}" != x"baseline" -a \
x"${rr[mode]}" = x"jenkins-full" ]; then
read_only=false
fi