Skip to content

Commit b804c4d

Browse files
authored
refactor: update tag fetching logic (#173)
1 parent 681d729 commit b804c4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/create-release-branch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ if ! git remote get-url upstream &>/dev/null; then
2626
git remote add "upstream" https://github.com/kubernetes/kubernetes.git
2727
fi
2828

29-
# Fetch upstream tags
30-
git fetch --tags --quiet upstream || true
31-
3229
# Process each tag
3330
for tag in $NEW_TAGS; do
3431
echo "========================================================================================"
3532
echo "[INFO] Processing version: ${tag}"
3633

34+
# Fetch the specific tag from upstream
35+
git fetch upstream refs/tags/${tag}:refs/tags/${tag} --no-tags
36+
3737
# Skip if tag > MAX_VERSION
3838
if [[ "$(printf '%s\n' "$tag" "$MAX_VERSION" | sort -V | tail -1)" == "$tag" ]]; then
3939
echo "[INFO] Skipping version $tag as it is >= $MAX_VERSION"

0 commit comments

Comments
 (0)