Skip to content

Commit d98c6c4

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 36fd15a commit d98c6c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

helpers.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function repo_sync {
7575
git config --global http.https://${domain}/factories.extraheader "$(cat /secrets/git.http.extraheader)"
7676
fi
7777
for i in $(seq 4); do
78-
run repo init --repo-rev=v2.35 --no-clone-bundle -u $* ${REPO_INIT_OVERRIDES} && break
78+
run repo init --depth=1 --repo-rev=v2.35 --no-clone-bundle -u $* ${REPO_INIT_OVERRIDES} && break
7979
status "repo init failed with error $?"
8080
[ $i -eq 4 ] && exit 1
8181
status "sleeping and trying again"
@@ -106,6 +106,9 @@ function set_base_lmp_version {
106106
cp -R .repo/manifests.git $WORKCOPY
107107
pushd $WORKCOPY >/dev/null
108108

109+
# We need a full history and not a shallow copy
110+
git fetch --unshallow
111+
109112
# 2: Replace all tags
110113
git tag --delete $(git tag) >/dev/null
111114
git remote set-url origin https://github.com/foundriesio/lmp-manifest

0 commit comments

Comments
 (0)