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

JingsongLi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-mosaic.git


The following commit(s) were added to refs/heads/main by this push:
     new af5c21e  ci: fix update_branch_version.sh skipping Cargo.toml on 
snapshot bumps (#57)
af5c21e is described below

commit af5c21e15d5cbf573997fc8e15562669194688cf
Author: jianguotian <[email protected]>
AuthorDate: Fri Jun 12 19:38:01 2026 +0800

    ci: fix update_branch_version.sh skipping Cargo.toml on snapshot bumps (#57)
---
 tools/update_branch_version.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/update_branch_version.sh b/tools/update_branch_version.sh
index 03ec8a8..affe599 100755
--- a/tools/update_branch_version.sh
+++ b/tools/update_branch_version.sh
@@ -52,17 +52,19 @@ fi
 
 cd ..
 
-# For Cargo.toml and pyproject.toml, strip any -SNAPSHOT suffix (not valid in 
those ecosystems)
+# Cargo.toml and pyproject.toml never carry the -SNAPSHOT suffix, so strip it
+# from both old and new versions when matching/replacing there.
+OLD_VERSION_CLEAN=$(echo "$OLD_VERSION" | sed 's/-SNAPSHOT//')
 NEW_VERSION_CLEAN=$(echo "$NEW_VERSION" | sed 's/-SNAPSHOT//')
 
 #change version in all pom files (match both exact and -SNAPSHOT suffix)
 find . -name 'pom.xml' -type f -exec perl -pi -e 
's#<version>'$OLD_VERSION'(-SNAPSHOT)?</version>#<version>'$NEW_VERSION'</version>#'
 {} \;
 
 #change version in Cargo.toml files
-find . -name 'Cargo.toml' -not -path '*/target/*' -type f -exec perl -pi -e 
's#^version = "'$OLD_VERSION'"#version = "'$NEW_VERSION_CLEAN'"#' {} \;
+find . -name 'Cargo.toml' -not -path '*/target/*' -type f -exec perl -pi -e 
's#^version = "'$OLD_VERSION_CLEAN'"#version = "'$NEW_VERSION_CLEAN'"#' {} \;
 
 #change version in pyproject.toml
-perl -pi -e 's#^version = "'$OLD_VERSION'"#version = "'$NEW_VERSION_CLEAN'"#' 
python/pyproject.toml
+perl -pi -e 's#^version = "'$OLD_VERSION_CLEAN'"#version = 
"'$NEW_VERSION_CLEAN'"#' python/pyproject.toml
 
 git commit -am "Update version to $NEW_VERSION"
 

Reply via email to