diff --git a/ext/swoole b/ext/swoole index c086ddffe1..535961680b 160000 --- a/ext/swoole +++ b/ext/swoole @@ -1 +1 @@ -Subproject commit c086ddffe19626e4ec953a19f556212d0a9110e2 +Subproject commit 535961680b82965bbdca0aaf0e066464467523a7 diff --git a/setup-swoole-cli-runtime.sh b/setup-swoole-cli-runtime.sh index 72868f7c68..8c3e378e27 100644 --- a/setup-swoole-cli-runtime.sh +++ b/setup-swoole-cli-runtime.sh @@ -70,8 +70,17 @@ 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