Skip to content

Commit

Permalink
chore: clone examples with depth=1 to speed up test
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdw committed Feb 21, 2024
1 parent 20ec1b3 commit cfbcb3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/parse-examples
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ function clone_repo {
path=examples/$name
if [ ! -d "$path" ]; then
echo "Cloning $owner/$name"
git clone "https://github.com/$owner/$name" "$path"
git clone --depth 1 "https://github.com/$owner/$name" "$path"
fi

pushd "$path" >/dev/null
actual_sha=$(git rev-parse HEAD)
if [ "$actual_sha" != "$sha" ]; then
echo "Updating $owner/$name to $sha"
git fetch
git fetch --depth 1 origin "$sha"
git reset --hard "$sha"
fi
popd >/dev/null
Expand Down

0 comments on commit cfbcb3f

Please sign in to comment.