aboutsummaryrefslogtreecommitdiff
path: root/android-lcr
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2019-11-14 14:38:41 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2019-11-14 14:38:41 +0800
commit9336fe6fd25171672941b24a40a58c4ab3d78f85 (patch)
treeb45bbf0121222a2cecd3910dc6825d1b5ff48b37 /android-lcr
parent06bbbeae818ece17874ad6f1583a0637d8060e4f (diff)
android-lcr/common/builders.sh: remove all the files except .repo
to avoid failures caused by remainders from other builds. only keep .repo directory so that the repo sync speed would be fast Change-Id: I33dc6d6feb820b7f1075e525b80b490d7d2fe33e Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'android-lcr')
-rwxr-xr-xandroid-lcr/common/builders.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/android-lcr/common/builders.sh b/android-lcr/common/builders.sh
index bf5934d7..eeeba99a 100755
--- a/android-lcr/common/builders.sh
+++ b/android-lcr/common/builders.sh
@@ -27,6 +27,13 @@ if [ ! -d "/home/buildslave/srv/${BUILD_DIR}" ]; then
fi
cd /home/buildslave/srv/${BUILD_DIR}
+# clean the out directory as this workspace is used accross multiple builds
+rm -fr .repo-backup
+[ -d "build/.repo" ] && mv -f build/.repo .repo-backup
+rm -fr build/ && mkdir -p build/
+[ -d "build/.repo-backup" ] && mv -f .repo-backup build/.repo
+[ -d "build/.repo/local_manifests" ] && rm -fr build/.repo/local_manifests
+
# Download helper scripts (repo)
mkdir -p ${HOME}/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo