From d7415ab27a0d46314b88a7e6332976d7b34662b3 Mon Sep 17 00:00:00 2001 From: Littlegnal <8847263+littleGnAl@users.noreply.github.com> Date: Thu, 6 Jun 2024 18:35:15 +0800 Subject: [PATCH] [ci][code-gen.yaml] Fix version regex (#1821) The code only matches the 3-segment version, but the native SDK can be 2-segment or 4-segment. --- tool/terra/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/terra/build.sh b/tool/terra/build.sh index bb1c376cd..9c98f5823 100644 --- a/tool/terra/build.sh +++ b/tool/terra/build.sh @@ -12,10 +12,10 @@ if [ -n "$NEW_VERSION" ]; then # Check the operating system type if [[ "$OSTYPE" == "darwin"* ]]; then # macOS - sed -i '' -E "s/rtc_[0-9]+\.[0-9]+\.[0-9]+/${NEW_VERSION}/g" $TERRA_MAIN_FILE + sed -i '' -E "s/rtc_[0-9]+\.[0-9]+(\.[0-9]+)*/${NEW_VERSION}/g" $TERRA_MAIN_FILE else # Linux and other Unix-like systems - sed -i -E "s/rtc_[0-9]+\.[0-9]+\.[0-9]+/${NEW_VERSION}/g" $TERRA_MAIN_FILE + sed -i -E "s/rtc_[0-9]+\.[0-9]+(\.[0-9]+)*/${NEW_VERSION}/g" $TERRA_MAIN_FILE fi echo "Updated version to ${NEW_VERSION} in $TERRA_MAIN_FILE" fi