File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1- version : 10.1.16
1+ version : 10.1.17
Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ if [ -n "$SPARE_CHECKOUT" ]; then
130130 exit 0
131131 fi
132132
133+ if [ -n " $DEPTH " ]; then
134+ GIT_COMMAND=" git_retry git clone $REPO $CLONE_DIR --depth=$DEPTH "
135+ else
136+ GIT_COMMAND=" git_retry git clone $REPO $CLONE_DIR "
137+ fi
138+
133139# Check if the cloned dir already exists from previous builds
134140if [ -d " $CLONE_DIR " ]; then
135141
@@ -174,7 +180,7 @@ if [ -d "$CLONE_DIR" ]; then
174180 # Clean folder and clone a fresh copy on current directory
175181 cd ..
176182 rm -rf $CLONE_DIR
177- git_retry git clone $REPO $CLONE_DIR
183+ eval $GIT_COMMAND
178184 cd $CLONE_DIR
179185
180186 if [ -n " $REVISION " ]; then
@@ -184,9 +190,8 @@ if [ -d "$CLONE_DIR" ]; then
184190else
185191
186192 # Clone a fresh copy
187- git_retry git clone $REPO $CLONE_DIR
193+ eval $GIT_COMMAND
188194 cd $CLONE_DIR
189-
190195 if [ -n " $REVISION " ]; then
191196 git checkout $REVISION
192197 fi
You can’t perform that action at this time.
0 commit comments