From 2b7ca7affe5ec2e02e31d8e0bb0b7ee37b45b167 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 26 Aug 2024 18:00:32 +0300 Subject: [PATCH 01/28] add --depth=$DEPTH --- start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 86787f3..fa9a724 100644 --- a/start.sh +++ b/start.sh @@ -198,10 +198,10 @@ 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/*" + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" --depth=$DEPTH echo "Fetching the updates from origin" - git_retry git fetch --tags + git_retry git fetch --tags --depth=$DEPTH git remote set-head origin --auto if [ -n "$REVISION" ]; then From ea61ac211e11144f6aa018f71823433fc6ab6a6a Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 26 Aug 2024 18:05:30 +0300 Subject: [PATCH 02/28] bump --- service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service.yaml b/service.yaml index 65c948d..efcf655 100644 --- a/service.yaml +++ b/service.yaml @@ -1 +1 @@ -version: 10.1.28 +version: 10.1.29 From 59fd3e769dbe40222c6178d2d7c2fc38ef1cffb3 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Wed, 28 Aug 2024 16:53:26 +0300 Subject: [PATCH 03/28] test2 --- start.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index fa9a724..c038c7a 100644 --- a/start.sh +++ b/start.sh @@ -198,10 +198,21 @@ 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/*" --depth=$DEPTH + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" echo "Fetching the updates from origin" - git_retry git fetch --tags --depth=$DEPTH + # Set remote branches only if REVISION is defined + if [ -n "$REVISION" ]; then + git_retry git remote set-branches origin "$REVISION" + fi + + # Fetch updates using depth only if DEPTH is defined + if [ -n "$DEPTH" ]; then + git_retry git fetch origin ${REVISION:+$REVISION} --depth=$DEPTH + else + git_retry git fetch origin ${REVISION:+$REVISION} + fi + git remote set-head origin --auto if [ -n "$REVISION" ]; then From ccebd4a48355d574e0e021f1821a8ba81a8aa598 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 21:51:08 +0300 Subject: [PATCH 04/28] test3 --- start.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/start.sh b/start.sh index c038c7a..ac2d172 100644 --- a/start.sh +++ b/start.sh @@ -198,21 +198,25 @@ 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" - # Set remote branches only if REVISION is defined - if [ -n "$REVISION" ]; then - git_retry git remote set-branches origin "$REVISION" + # Check if DEPTH is set (and non-zero) to decide on the fetch strategy + if [ -n "$DEPTH" ]; then + echo "Fetching updates with depth $DEPTH" + git_retry git fetch --depth=$DEPTH origin --tags --prune "+refs/tags/*:refs/tags/*" + else + echo "Fetching full updates" + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" fi - # Fetch updates using depth only if DEPTH is defined + echo "Fetching the updates from origin" if [ -n "$DEPTH" ]; then - git_retry git fetch origin ${REVISION:+$REVISION} --depth=$DEPTH + git_retry git fetch --depth=$DEPTH --tags else - git_retry git fetch origin ${REVISION:+$REVISION} + git_retry git fetch --tags fi + + echo "Fetching the updates from origin" + git_retry git fetch --tags git remote set-head origin --auto if [ -n "$REVISION" ]; then From dd7febe045a8d00f5b96023fef183a0918d2fb49 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 22:01:25 +0300 Subject: [PATCH 05/28] test4 --- start.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/start.sh b/start.sh index ac2d172..edfe955 100644 --- a/start.sh +++ b/start.sh @@ -214,9 +214,6 @@ if [ -d "$CLONE_DIR" ]; then git_retry git fetch --tags fi - - echo "Fetching the updates from origin" - git_retry git fetch --tags git remote set-head origin --auto if [ -n "$REVISION" ]; then From ed4e4e8d8fe06ad40530bb0a52bed3591f2fb9b2 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 22:21:17 +0300 Subject: [PATCH 06/28] test5 --- start.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/start.sh b/start.sh index edfe955..c3643ef 100644 --- a/start.sh +++ b/start.sh @@ -207,13 +207,6 @@ if [ -d "$CLONE_DIR" ]; then git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" fi - echo "Fetching the updates from origin" - if [ -n "$DEPTH" ]; then - git_retry git fetch --depth=$DEPTH --tags - else - git_retry git fetch --tags - fi - git remote set-head origin --auto if [ -n "$REVISION" ]; then From 47189ea572730920492efdd1b5c7fabd74c61ae3 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 22:45:41 +0300 Subject: [PATCH 07/28] test6 --- start.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/start.sh b/start.sh index c3643ef..5c96ed6 100644 --- a/start.sh +++ b/start.sh @@ -198,15 +198,10 @@ if [ -d "$CLONE_DIR" ]; then git clean -df git gc --force git_retry git remote prune origin - # Check if DEPTH is set (and non-zero) to decide on the fetch strategy - if [ -n "$DEPTH" ]; then - echo "Fetching updates with depth $DEPTH" - git_retry git fetch --depth=$DEPTH origin --tags --prune "+refs/tags/*:refs/tags/*" - else - echo "Fetching full updates" - git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" - fi + echo "Fetching the updates from origin" + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" + git_retry git fetch --tags git remote set-head origin --auto if [ -n "$REVISION" ]; then From fd13aea6ef905b60b236b6e8496164bdc420c046 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 22:59:25 +0300 Subject: [PATCH 08/28] test7 --- start.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/start.sh b/start.sh index 5c96ed6..ac12d70 100644 --- a/start.sh +++ b/start.sh @@ -201,7 +201,6 @@ if [ -d "$CLONE_DIR" ]; then echo "Fetching the updates from origin" git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" - git_retry git fetch --tags git remote set-head origin --auto if [ -n "$REVISION" ]; then From 9bd128237215e2853eec818c2e5c9417ec0797e9 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 23:07:38 +0300 Subject: [PATCH 09/28] test8 --- start.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index ac12d70..d758100 100644 --- a/start.sh +++ b/start.sh @@ -200,7 +200,12 @@ if [ -d "$CLONE_DIR" ]; then git_retry git remote prune origin echo "Fetching the updates from origin" - git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" +# git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" + if [ -n "$DEPTH" ]; then + git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" --depth=$DEPTH + else + git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" + fi git remote set-head origin --auto if [ -n "$REVISION" ]; then From a4fdd4423676a936138a264cb708269e9598b693 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 23:14:14 +0300 Subject: [PATCH 10/28] test9 --- start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index d758100..03ea348 100644 --- a/start.sh +++ b/start.sh @@ -199,11 +199,13 @@ if [ -d "$CLONE_DIR" ]; then git gc --force git_retry git remote prune origin - echo "Fetching the updates from origin" + # git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" if [ -n "$DEPTH" ]; then + echo "Fetching the updates from origin with depth $DEPTH" git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" --depth=$DEPTH else + echo "Fetching the updates from origin" git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" fi git remote set-head origin --auto From bd7264ad36b401da3865a2fb77613e853d4c7c99 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 23:18:24 +0300 Subject: [PATCH 11/28] test10 --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 03ea348..43234de 100644 --- a/start.sh +++ b/start.sh @@ -203,7 +203,7 @@ if [ -d "$CLONE_DIR" ]; then # git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" if [ -n "$DEPTH" ]; then echo "Fetching the updates from origin with depth $DEPTH" - git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" --depth=$DEPTH + git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" --depth=$DEPTH --no-tags else echo "Fetching the updates from origin" git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" From 1930769d7877581f49933162deb0ba1d7649db21 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 23:24:37 +0300 Subject: [PATCH 12/28] test11 --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 43234de..c053a88 100644 --- a/start.sh +++ b/start.sh @@ -203,7 +203,7 @@ if [ -d "$CLONE_DIR" ]; then # git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" if [ -n "$DEPTH" ]; then echo "Fetching the updates from origin with depth $DEPTH" - git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" --depth=$DEPTH --no-tags + git_retry git fetch origin --prune --depth=$DEPTH --no-tags else echo "Fetching the updates from origin" git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" From 209d664c310eb30136fe3b3e75c409e463a1a3f6 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 23:34:49 +0300 Subject: [PATCH 13/28] test12 --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index c053a88..c23fa49 100644 --- a/start.sh +++ b/start.sh @@ -203,7 +203,7 @@ if [ -d "$CLONE_DIR" ]; then # git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" if [ -n "$DEPTH" ]; then echo "Fetching the updates from origin with depth $DEPTH" - git_retry git fetch origin --prune --depth=$DEPTH --no-tags + git_retry git fetch origin $REVISION --prune --depth=$DEPTH --no-tags else echo "Fetching the updates from origin" git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" From ce1ec84dddb81b99397b2fcd04567e6415a63f96 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Thu, 29 Aug 2024 23:57:52 +0300 Subject: [PATCH 14/28] test13 --- start.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/start.sh b/start.sh index c23fa49..9f2785c 100644 --- a/start.sh +++ b/start.sh @@ -199,15 +199,10 @@ if [ -d "$CLONE_DIR" ]; then git gc --force git_retry git remote prune origin + echo "Fetching the updates from origin with${DEPTH:+ depth $DEPTH}" + + git_retry git fetch origin ${REVISION:-'HEAD'} --prune --depth=${DEPTH:-0} --no-tags -# git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" - if [ -n "$DEPTH" ]; then - echo "Fetching the updates from origin with depth $DEPTH" - git_retry git fetch origin $REVISION --prune --depth=$DEPTH --no-tags - else - echo "Fetching the updates from origin" - git_retry git fetch origin --prune "+refs/tags/*:refs/tags/*" - fi git remote set-head origin --auto if [ -n "$REVISION" ]; then From f181fb85b4c39ea7ac23f574a9c49b313f436db5 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Sun, 1 Sep 2024 17:44:10 +0300 Subject: [PATCH 15/28] lint --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 9f2785c..6f11809 100644 --- a/start.sh +++ b/start.sh @@ -214,7 +214,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 From 7f8ed9a48d58e6d7d8203a658d70e52859d07efb Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 16:20:31 +0300 Subject: [PATCH 16/28] add SKIP_TAGS_ON_UPDATE --- start.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 6f11809..e527b03 100644 --- a/start.sh +++ b/start.sh @@ -199,9 +199,14 @@ if [ -d "$CLONE_DIR" ]; then git gc --force git_retry git remote prune origin - echo "Fetching the updates from origin with${DEPTH:+ depth $DEPTH}" + if [ -n "$SKIP_TAGS_ON_UPDATE" ]; then + echo "Fetching updates from origin with${DEPTH:+ a depth of $DEPTH}, skipping tags" + git_retry git fetch origin ${REVISION:-'HEAD'} --prune --depth=${DEPTH:-0} --no-tags + else + echo "Fetching updates from origin with${DEPTH:+ a depth of $DEPTH}, including tags" + git_retry git fetch origin ${REVISION:-'HEAD'} --depth=${DEPTH:-0} --tags --prune "+refs/tags/*:refs/tags/*" + fi - git_retry git fetch origin ${REVISION:-'HEAD'} --prune --depth=${DEPTH:-0} --no-tags git remote set-head origin --auto From 773e7d4b375cc7afe0d0257b547043a2fedb8c5a Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 17:27:35 +0300 Subject: [PATCH 17/28] update cmd --- start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/start.sh b/start.sh index e527b03..c4e52e6 100644 --- a/start.sh +++ b/start.sh @@ -200,11 +200,11 @@ if [ -d "$CLONE_DIR" ]; then git_retry git remote prune origin if [ -n "$SKIP_TAGS_ON_UPDATE" ]; then - echo "Fetching updates from origin with${DEPTH:+ a depth of $DEPTH}, skipping tags" - git_retry git fetch origin ${REVISION:-'HEAD'} --prune --depth=${DEPTH:-0} --no-tags + echo "Fetching updates from origin, skipping tags" + git_retry git fetch origin --prune --no-tags else - echo "Fetching updates from origin with${DEPTH:+ a depth of $DEPTH}, including tags" - git_retry git fetch origin ${REVISION:-'HEAD'} --depth=${DEPTH:-0} --tags --prune "+refs/tags/*:refs/tags/*" + echo "Fetching updates from origin" + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" fi From 1359bda70152815b5fe2e842f2e58a6c33a37a5d Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 18:06:53 +0300 Subject: [PATCH 18/28] update cmd with depth --- start.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/start.sh b/start.sh index c4e52e6..03a8c87 100644 --- a/start.sh +++ b/start.sh @@ -200,14 +200,15 @@ if [ -d "$CLONE_DIR" ]; then git_retry git remote prune origin if [ -n "$SKIP_TAGS_ON_UPDATE" ]; then - echo "Fetching updates from origin, skipping tags" - git_retry git fetch origin --prune --no-tags + echo "Fetching updates from origin ${DEPTH:+ with depth $DEPTH}, skipping tags" + git_retry git fetch origin --prune --no-tags ${DEPTH:+ --depth=$DEPTH} else - echo "Fetching updates from origin" - git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" + echo "Fetching updates from origin" + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" fi + git remote set-head origin --auto if [ -n "$REVISION" ]; then From 65165f3b28cd1c0ac2f09c2e4016c7ec36ebcbc8 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 18:07:37 +0300 Subject: [PATCH 19/28] update cmd with depth --- start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 03a8c87..953fd02 100644 --- a/start.sh +++ b/start.sh @@ -203,8 +203,8 @@ if [ -d "$CLONE_DIR" ]; then echo "Fetching updates from origin ${DEPTH:+ with depth $DEPTH}, skipping tags" git_retry git fetch origin --prune --no-tags ${DEPTH:+ --depth=$DEPTH} else - echo "Fetching updates from origin" - git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" + echo "Fetching updates from origin ${DEPTH:+ with depth $DEPTH}" + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" ${DEPTH:+ --depth=$DEPTH} fi From a83ee5d1ae6f427d02b13b859fa7e70cf8a557e1 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 18:21:59 +0300 Subject: [PATCH 20/28] ${REVISION:+$REVISION} --- start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 953fd02..820e5ad 100644 --- a/start.sh +++ b/start.sh @@ -200,10 +200,10 @@ if [ -d "$CLONE_DIR" ]; then git_retry git remote prune origin if [ -n "$SKIP_TAGS_ON_UPDATE" ]; then - echo "Fetching updates from origin ${DEPTH:+ with depth $DEPTH}, skipping tags" - git_retry git fetch origin --prune --no-tags ${DEPTH:+ --depth=$DEPTH} + echo "Fetching updates from origin${DEPTH:+ with depth $DEPTH}, skipping tags" + git_retry git fetch origin ${REVISION:+$REVISION} --prune --no-tags ${DEPTH:+ --depth=$DEPTH} else - echo "Fetching updates from origin ${DEPTH:+ with depth $DEPTH}" + echo "Fetching updates from origin${DEPTH:+ with depth $DEPTH}" git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" ${DEPTH:+ --depth=$DEPTH} fi From 1b87da4973e7efa8fffd306fb9b16d6d83deb1fc Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 18:40:38 +0300 Subject: [PATCH 21/28] lint --- start.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/start.sh b/start.sh index 820e5ad..86fffd6 100644 --- a/start.sh +++ b/start.sh @@ -207,8 +207,6 @@ if [ -d "$CLONE_DIR" ]; then 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 From fa6f3f0b28a08924782de189c2fe87f2e58c3c7a Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 18:52:12 +0300 Subject: [PATCH 22/28] add comment --- start.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 86fffd6..37320fa 100644 --- a/start.sh +++ b/start.sh @@ -203,8 +203,11 @@ if [ -d "$CLONE_DIR" ]; then echo "Fetching updates from origin${DEPTH:+ with depth $DEPTH}, skipping tags" git_retry git fetch origin ${REVISION:+$REVISION} --prune --no-tags ${DEPTH:+ --depth=$DEPTH} else - echo "Fetching updates from origin${DEPTH:+ with depth $DEPTH}" - git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" ${DEPTH:+ --depth=$DEPTH} + # in order to not change logic that already working we not specifying depth & origin + # it will be better to use this cmd, but with the new flag it will work as the following without tags as well + # git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" ${DEPTH:+ --depth=$DEPTH} + echo "Fetching updates from origin" + git_retry git fetch --tags --prune "+refs/tags/*:refs/tags/*" fi git remote set-head origin --auto From b0041e21a23f9e955c77a446eecee4425ea71f9a Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 19:04:52 +0300 Subject: [PATCH 23/28] git fetch --tags --- start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/start.sh b/start.sh index 37320fa..c761a41 100644 --- a/start.sh +++ b/start.sh @@ -203,11 +203,11 @@ if [ -d "$CLONE_DIR" ]; then echo "Fetching updates from origin${DEPTH:+ with depth $DEPTH}, skipping tags" git_retry git fetch origin ${REVISION:+$REVISION} --prune --no-tags ${DEPTH:+ --depth=$DEPTH} else - # in order to not change logic that already working we not specifying depth & origin - # it will be better to use this cmd, but with the new flag it will work as the following without tags as well - # git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" ${DEPTH:+ --depth=$DEPTH} + # In order to not change logic that already working im keeping git_retry git fetch --tags + # This command fetches updates from all configured remotes in your repository, not just from "origin". echo "Fetching updates from origin" - git_retry git fetch --tags --prune "+refs/tags/*:refs/tags/*" + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" + git fetch --tags fi git remote set-head origin --auto From 5124cd858fc65b0c8478b6186d59ffa34b8ca456 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 19:05:30 +0300 Subject: [PATCH 24/28] git fetch --tags --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index c761a41..bbee0a3 100644 --- a/start.sh +++ b/start.sh @@ -203,7 +203,7 @@ if [ -d "$CLONE_DIR" ]; then echo "Fetching updates from origin${DEPTH:+ with depth $DEPTH}, skipping tags" git_retry git fetch origin ${REVISION:+$REVISION} --prune --no-tags ${DEPTH:+ --depth=$DEPTH} else - # In order to not change logic that already working im keeping git_retry git fetch --tags + # In order to not change logic that already working we keeping git_retry git fetch --tags # This command fetches updates from all configured remotes in your repository, not just from "origin". echo "Fetching updates from origin" git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" From f7fea1060c92f78e92e7c4cd97fea10d5227c48a Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 19:07:09 +0300 Subject: [PATCH 25/28] git_retry git fetch --tags --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index bbee0a3..cce4e08 100644 --- a/start.sh +++ b/start.sh @@ -207,7 +207,7 @@ if [ -d "$CLONE_DIR" ]; then # This command fetches updates from all configured remotes in your repository, not just from "origin". echo "Fetching updates from origin" git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" - git fetch --tags + git_retry git fetch --tags fi git remote set-head origin --auto From 9f1ea5414f384c8a46222ed3e9094ba67da8d14c Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Mon, 2 Sep 2024 19:16:51 +0300 Subject: [PATCH 26/28] git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" --- start.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/start.sh b/start.sh index cce4e08..b232aee 100644 --- a/start.sh +++ b/start.sh @@ -203,11 +203,8 @@ if [ -d "$CLONE_DIR" ]; then echo "Fetching updates from origin${DEPTH:+ with depth $DEPTH}, skipping tags" git_retry git fetch origin ${REVISION:+$REVISION} --prune --no-tags ${DEPTH:+ --depth=$DEPTH} else - # In order to not change logic that already working we keeping git_retry git fetch --tags - # This command fetches updates from all configured remotes in your repository, not just from "origin". echo "Fetching updates from origin" git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" - git_retry git fetch --tags fi git remote set-head origin --auto From 88eb361a85abccdcf56fc821527d868f3782b5fa Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Tue, 3 Sep 2024 09:54:29 +0300 Subject: [PATCH 27/28] remove --prune --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index b232aee..77e2c59 100644 --- a/start.sh +++ b/start.sh @@ -201,7 +201,7 @@ if [ -d "$CLONE_DIR" ]; then 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} --prune --no-tags ${DEPTH:+ --depth=$DEPTH} + 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/*" From f02cc877b70254e9b08fddad265e6d5a3e8f1177 Mon Sep 17 00:00:00 2001 From: eti-codefresh Date: Tue, 3 Sep 2024 14:34:14 +0300 Subject: [PATCH 28/28] add ${DEPTH:+ --depth=$DEPTH} --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 77e2c59..2e18b79 100644 --- a/start.sh +++ b/start.sh @@ -204,7 +204,7 @@ if [ -d "$CLONE_DIR" ]; then 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/*" + git_retry git fetch origin --tags --prune "+refs/tags/*:refs/tags/*" ${DEPTH:+ --depth=$DEPTH} fi git remote set-head origin --auto