Skip to content

Commit

Permalink
[ci] Support modify version in terra_config_main.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
littleGnAl committed Jun 6, 2024
1 parent 0b57eb3 commit 58b475d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tool/terra/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ PROJECT_ROOT=$(realpath ${MY_PATH}/../..)
TERRA_MAIN_FILE=${PROJECT_ROOT}/tool/terra/terra_config_main.yaml

if [ -n "$NEW_VERSION" ]; then
sed -i '' -E "s/rtc_[0-9]+\.[0-9]+\.[0-9]+/${NEW_VERSION}/g" $TERRA_MAIN_FILE
# 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
else
# Linux and other Unix-like systems
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

Expand Down

0 comments on commit 58b475d

Please sign in to comment.