Skip to content

Commit

Permalink
Merge pull request #853 from jingjingxyk/experiment-feature-new
Browse files Browse the repository at this point in the history
Experiment feature new
  • Loading branch information
jingjingxyk authored Dec 5, 2024
2 parents 16adb65 + afb601d commit 6b9d391
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions setup-swoole-cli-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,16 @@ while [ $# -gt 0 ]; do
;;
--version)
# 指定发布 TAG
X_VERSION=$(echo "$2" | grep -E '^v\d\.\d{1,2}\.\d{1,2}\.\d{1,2}$')
X_APP_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}')
if [ $OS = "macos" ]; then
X_VERSION=$(echo "$2" | grep -E '^v\d\.\d{1,2}\.\d{1,2}\.\d{1,2}$')
X_APP_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}')
elif [ $OS = "linux" ]; then
X_VERSION=$(echo "$2" | grep -P '^v\d\.\d{1,2}\.\d{1,2}\.\d{1,2}$')
X_APP_VERSION=$(echo "$2" | grep -Po '^v\d\.\d{1,2}\.\d{1,2}')
else
X_VERSION=''
X_APP_VERSION=''
fi
if [[ -n $X_VERSION ]] && [[ -n $X_APP_VERSION ]]; then
{
VERSION=$X_VERSION
Expand Down

0 comments on commit 6b9d391

Please sign in to comment.