File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
set -e
4
-
4
+ MAX_VERSION= " v1.33.0 "
5
5
NEW_RELEASE_BRANCHES=()
6
6
7
7
# Define temporary files
@@ -27,12 +27,24 @@ if ! git remote get-url upstream &>/dev/null; then
27
27
fi
28
28
29
29
# Fetch upstream tags
30
- git fetch --tags --quiet upstream || true
30
+ git fetch --tags --quiet --force upstream || true
31
31
32
32
# Process each tag
33
33
for tag in $NEW_TAGS ; do
34
34
echo " ========================================================================================"
35
35
echo " [INFO] Processing version: ${tag} "
36
+
37
+ # Skip if tag > MAX_VERSION
38
+ if [[ " $( printf ' %s\n' " $tag " " $MAX_VERSION " | sort -V | tail -1) " == " $tag " ]]; then
39
+ echo " [INFO] Skipping version $tag as it is >= $MAX_VERSION "
40
+ continue
41
+ fi
42
+
43
+ # Skip if the tag does not exist locally
44
+ if ! git rev-parse " refs/tags/$tag " > /dev/null 2>&1 ; then
45
+ echo " [WARN] Tag $tag does not exist locally. Skipping."
46
+ continue
47
+ fi
36
48
37
49
# Check if the branch already exist
38
50
if git show-ref --verify --quiet refs/remotes/origin/release-${tag} ; then
You can’t perform that action at this time.
0 commit comments