jenkins/build-seed: clone or rebase openbmc
Previously the script would only clone the main openbmc
repository, which would cause it to fail if ran multiple
times. Add logic to fetch/rebase when the repository
already exists.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic62a9fa320afab4e1a761fdf61d3e5b2d1a54232
diff --git a/jenkins/build-seed b/jenkins/build-seed
index 9baeffd..9bc8fd0 100755
--- a/jenkins/build-seed
+++ b/jenkins/build-seed
@@ -13,7 +13,12 @@
export LANG=en_US.UTF8
cd "${WORKSPACE}"
-git clone https://github.com/openbmc/openbmc.git
+if [ -d openbmc ]; then
+ git -C openbmc fetch
+ git -C openbmc rebase
+else
+ git clone https://github.com/openbmc/openbmc.git
+fi
# Ensure everything is built on same filesystem
export build_dir="${WORKSPACE}/build"