summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-02-12 09:27:42 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-02-18 15:31:30 +0000
commitb535f3acc6b1902ae3c79a9ffea40648edd404cc (patch)
treeccb3f1f49175a8688743ee692cb0179a998312d9
parent2689c8ee9739fd60d3fa184f1c666f7131d4e999 (diff)
[rr-many 2/N] Update and simplify round-robin.sh: clone_repo()
With simpler meaning of rr[COMPONENT_branch] to be either "baseline" (instead of "default", overrides from ${rr[current_project]}, etc.) we only need to resolve "baseline" value. Change-Id: I5f32949587688d152402b6b64ed4a37ac062019e
-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