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-12 09:27:42 +0000
commit81715828c6a023a0e774594173244d4e8e471033 (patch)
treeb442fce4bf5936d6fc295b4ffec94354401b6d5d
parent2fa4f7225c39474d8e27f864d8c173d68699ed2d (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