Skip to content

Commit 7f8ed9a

Browse files
committed
add SKIP_TAGS_ON_UPDATE
1 parent f181fb8 commit 7f8ed9a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

start.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,14 @@ if [ -d "$CLONE_DIR" ]; then
199199
git gc --force
200200
git_retry git remote prune origin
201201

202-
echo "Fetching the updates from origin with${DEPTH:+ depth $DEPTH}"
202+
if [ -n "$SKIP_TAGS_ON_UPDATE" ]; then
203+
echo "Fetching updates from origin with${DEPTH:+ a depth of $DEPTH}, skipping tags"
204+
git_retry git fetch origin ${REVISION:-'HEAD'} --prune --depth=${DEPTH:-0} --no-tags
205+
else
206+
echo "Fetching updates from origin with${DEPTH:+ a depth of $DEPTH}, including tags"
207+
git_retry git fetch origin ${REVISION:-'HEAD'} --depth=${DEPTH:-0} --tags --prune "+refs/tags/*:refs/tags/*"
208+
fi
203209

204-
git_retry git fetch origin ${REVISION:-'HEAD'} --prune --depth=${DEPTH:-0} --no-tags
205210

206211
git remote set-head origin --auto
207212

0 commit comments

Comments
 (0)