Skip to content

fix: add SKIP_TAGS_ON_UPDATE flag #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion service.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 10.1.28
version: 10.1.29
13 changes: 9 additions & 4 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,15 @@ if [ -d "$CLONE_DIR" ]; then
git clean -df
git gc --force
git_retry git remote prune origin
git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*"

echo "Fetching the updates from origin"
git_retry git fetch --tags
if [ -n "$SKIP_TAGS_ON_UPDATE" ]; then
echo "Fetching updates from origin${DEPTH:+ with depth $DEPTH}, skipping tags"
git_retry git fetch origin ${REVISION:+$REVISION} --no-tags ${DEPTH:+ --depth=$DEPTH}
else
echo "Fetching updates from origin"
git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" ${DEPTH:+ --depth=$DEPTH}
fi

git remote set-head origin --auto

if [ -n "$REVISION" ]; then
Expand All @@ -213,7 +218,7 @@ if [ -d "$CLONE_DIR" ]; then

# If the revision is identical to the current branch we can just reset it to the latest changes. This isn't needed when running detached
if [ "$REVISION" == "$CURRENT_BRANCH" ]; then
echo 'Resetting current branch $REVISION to latest changes...'
echo "Resetting current branch $REVISION to latest changes..."
git reset --hard origin/$REVISION
fi
fi
Expand Down