Skip to content

Commit 159fca7

Browse files
authored
chore: Update config.yml shallow depth during checkout (#2928)
1 parent ade1d2a commit 159fca7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,18 @@ commands:
107107
- run:
108108
name: Checkout code shallow and change to working directory
109109
command: |
110-
git clone --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" $CIRCLE_WORKING_DIRECTORY
110+
git clone --depth 10 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" $CIRCLE_WORKING_DIRECTORY
111111
cd $CIRCLE_WORKING_DIRECTORY
112112
113113
if [ -n "$CIRCLE_TAG" ]; then
114114
echo 'Fetch tag'
115-
git fetch --depth 1 --force origin "+refs/tags/${CIRCLE_TAG}:refs/tags/${CIRCLE_TAG}"
115+
git fetch --depth 10 --force origin "+refs/tags/${CIRCLE_TAG}:refs/tags/${CIRCLE_TAG}"
116116
elif [[ $(echo $CIRCLE_PULL_REQUEST | grep -E "${CIRCLE_BRANCH}$") ]]; then
117117
echo 'Fetch pull request'
118-
git fetch --depth 1 --force origin "$CIRCLE_BRANCH/head:remotes/origin/$CIRCLE_BRANCH"
118+
git fetch --depth 10 --force origin "$CIRCLE_BRANCH/head:remotes/origin/$CIRCLE_BRANCH"
119119
else
120120
echo 'Fetch branch'
121-
git fetch --depth 1 --force origin "$CIRCLE_BRANCH:remotes/origin/$CIRCLE_BRANCH"
121+
git fetch --depth 10 --force origin "$CIRCLE_BRANCH:remotes/origin/$CIRCLE_BRANCH"
122122
fi
123123
echo "Checking out the CI HEAD"
124124
git reset --hard "$CIRCLE_SHA1"

0 commit comments

Comments
 (0)