Skip to content

Commit e1d1ee5

Browse files
committed
helpers: Use shallow clones for android repo
We don't need full repo histories when syncing. This will make CI a little faster and less error prone. Signed-off-by: Andy Doan <andy@foundries.io>
1 parent 89af5c9 commit e1d1ee5

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

helpers.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function repo_sync {
7676
fi
7777
_repo_extra_args=""
7878
for i in $(seq 4); do
79-
if run repo init $_repo_extra_args --repo-rev=v2.35 --no-clone-bundle -u $* ${REPO_INIT_OVERRIDES}; then
79+
if run repo init $_repo_extra_args --depth=1 --repo-rev=v2.35 --no-clone-bundle -u $* ${REPO_INIT_OVERRIDES}; then
8080
break
8181
fi
8282
_repo_extra_args="--verbose"
@@ -107,6 +107,19 @@ function repo_sync {
107107
exit $?
108108
fi
109109
done
110+
111+
# NOTE: we need a shallow copy of all the repos, but a deep copy of
112+
# lmp-manifests so we can include the LmP version into the build.
113+
pushd .repo/manifests.git >/dev/null
114+
for i in $(seq 4); do
115+
run git fetch --unshallow && break
116+
status "git-fetch of lmp-manifests failed with error $?"
117+
[ $i -eq 4 ] && exit 1
118+
status "sleeping and trying again"
119+
sleep $(($i*2))
120+
done
121+
popd
122+
110123
if [ -d "$archive" ] ; then
111124
status "Generating pinned manifest"
112125
repo manifest -r -o $archive/manifest.pinned.xml

0 commit comments

Comments
 (0)