This is an automated email from the ASF dual-hosted git repository.

mbalassi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-docker.git


The following commit(s) were added to refs/heads/master by this push:
     new 9391951  Make only 2.1.1 as latest
9391951 is described below

commit 9391951145456c392ee058aadfa33588b1f981da
Author: Gabor Somogyi <[email protected]>
AuthorDate: Wed Nov 5 12:02:10 2025 +0100

    Make only 2.1.1 as latest
---
 common.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/common.sh b/common.sh
index 6c9d695..47257d9 100644
--- a/common.sh
+++ b/common.sh
@@ -48,13 +48,15 @@ dirCommit() {
 pruneTags() {
     local tags=$1
     local latestVersion=$2
-    if [[ $tags =~ $latestVersion ]]; then
+    # Escape dots in version for proper regex matching
+    local escapedVersion="${latestVersion//./\\.}"
+    if [[ $tags =~ (^|[, ])$escapedVersion([, -]|$) ]]; then
         # tags contains latest version. keep "latest" tag
         echo $tags
     else
         # remove "latest", any "scala_" or "javaXX" tag, unless it is the 
latest version
-        # the "scala" / "java" tags have a similar semantic as the "latest" 
tag in docker registries. 
-        echo $tags | sed -E 's|, 
(scala\|latest\|java[0-9]{1,2})[-_.[:alnum:]]*||g'
+        # the "scala" / "java" tags have a similar semantic as the "latest" 
tag in docker registries.
+        echo $tags | sed -E 's#, 
(scala|latest|java[0-9]{1,2})[-_.[:alnum:]]*##g'
     fi
 }
 

Reply via email to