summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>2013-04-01 09:49:55 (GMT)
committerJavier Martinez Canillas <javier.martinez@collabora.co.uk>2013-04-01 09:53:15 (GMT)
commitcb230fa9e12c1dfee038c1ce6ea160dfc9601e3e (patch)
tree2da94daaae58eacb349ba41012a08a539ba8fca8
parent0b7988ba5a0113ec80b450a2d98ecb689b575d19 (diff)
downloadjenkins-scripts-cb230fa9e12c1dfee038c1ce6ea160dfc9601e3e.tar.gz
jenkins-scripts-cb230fa9e12c1dfee038c1ce6ea160dfc9601e3e.tar.xz
build_poky.sh: always rebase branches from origin before build
When building images, the latest version of the Poky branch for each layer has to be used. To make sure that the layers are in sync with their tracking remotes repositories, an git update and rebase is made for all layers before building. This is also needed when triggering new builds due new commit on a Singularity layer repository. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
-rwxr-xr-xbuild_poky.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/build_poky.sh b/build_poky.sh
index e7ac011..7949631 100755
--- a/build_poky.sh
+++ b/build_poky.sh
@@ -97,9 +97,11 @@ for layer in "${!LAYERS[@]}"; do
exit 1
fi
fi
+ git remote update
if ! grep -q $BRANCH .git/HEAD; then
git checkout $BRANCH
fi
+ git rebase origin/$BRANCH
popd > /dev/null
fi
done