From 921af75696ef6a9623d1e2b42ba49d39aff1ae6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=BD=E5=90=A7=EF=BC=8C=E4=BD=A0=E6=83=B3=E8=AF=B4?= =?UTF-8?q?=E5=95=A5?= Date: Wed, 4 Dec 2024 07:39:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=20swoole-cli=20=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E6=97=B6=20=E5=8F=AF=E6=8C=87=E5=AE=9A=E7=89=88?= =?UTF-8?q?=E6=9C=AC=20=20(#842)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 指定下载 swoole-cli 版本 * 指定下载 swoole-cli 版本 --- README.md | 3 +++ setup-swoole-cli-runtime.sh | 39 ++++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 902edf4a9c..1989bead4d 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,9 @@ curl -fSL https://github.com/swoole/swoole-cli/blob/main/setup-swoole-cli-runtim # 来自 https://www.swoole.com/download curl -fSL https://github.com/swoole/swoole-cli/blob/main/setup-swoole-cli-runtime.sh?raw=true | bash -s -- --mirror china +# 指定发布版本 +curl -fSL https://github.com/swoole/swoole-cli/blob/main/setup-swoole-cli-runtime.sh?raw=true | bash -s -- --version v5.1.6.0 + ``` ## `swoole-cli`构建文档 diff --git a/setup-swoole-cli-runtime.sh b/setup-swoole-cli-runtime.sh index 34421cdeea..72868f7c68 100644 --- a/setup-swoole-cli-runtime.sh +++ b/setup-swoole-cli-runtime.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -exu +set -xu __DIR__=$( cd "$(dirname "$0")" pwd @@ -52,19 +52,6 @@ APP_VERSION='v5.1.5' APP_NAME='swoole-cli' VERSION='v5.1.5.1' -mkdir -p bin/runtime -mkdir -p var/runtime - -cd ${__PROJECT__}/var/runtime - -APP_DOWNLOAD_URL="https://github.com/swoole/swoole-cli/releases/download/${VERSION}/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz" -COMPOSER_DOWNLOAD_URL="https://getcomposer.org/download/latest-stable/composer.phar" -CACERT_DOWNLOAD_URL="https://curl.se/ca/cacert.pem" - -if [ $OS = 'windows' ]; then - APP_DOWNLOAD_URL="https://github.com/swoole/swoole-cli/releases/download/${VERSION}/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip" -fi - MIRROR='' while [ $# -gt 0 ]; do case "$1" in @@ -81,6 +68,17 @@ while [ $# -gt 0 ]; do NO_PROXY="${NO_PROXY},.myqcloud.com,.swoole.com" export NO_PROXY="${NO_PROXY},.tsinghua.edu.cn,.ustc.edu.cn,.npmmirror.com" ;; + --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 [[ -n $X_VERSION ]] && [[ -n $X_APP_VERSION ]]; then + { + VERSION=$X_VERSION + APP_VERSION=$X_APP_VERSION + } + fi + ;; --*) echo "Illegal option $1" ;; @@ -88,6 +86,19 @@ while [ $# -gt 0 ]; do shift $(($# > 0 ? 1 : 0)) done +mkdir -p bin/runtime +mkdir -p var/runtime + +cd ${__PROJECT__}/var/runtime + +APP_DOWNLOAD_URL="https://github.com/swoole/swoole-cli/releases/download/${VERSION}/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz" +COMPOSER_DOWNLOAD_URL="https://getcomposer.org/download/latest-stable/composer.phar" +CACERT_DOWNLOAD_URL="https://curl.se/ca/cacert.pem" + +if [ $OS = 'windows' ]; then + APP_DOWNLOAD_URL="https://github.com/swoole/swoole-cli/releases/download/${VERSION}/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip" +fi + case "$MIRROR" in china) APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz" From d52f304a61a2dc04b3dd84429edc7b25f24dc83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=BD=E5=90=A7=EF=BC=8C=E4=BD=A0=E6=83=B3=E8=AF=B4?= =?UTF-8?q?=E5=95=A5?= Date: Wed, 4 Dec 2024 07:40:09 +0800 Subject: [PATCH 2/4] extensions.md add xslwriter (#840) * extensions.md add xslwriter * extensions.md add xslwriter --- docs/extensions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/extensions.md b/docs/extensions.md index e1687d083f..871d9842df 100644 --- a/docs/extensions.md +++ b/docs/extensions.md @@ -51,6 +51,7 @@ | uuid | ✅ | ✅ | ❌ | ❌ | | mailparse | ✅ | ✅ | ❌ | ❌ | | gettext | ✅ | ❌ | ❌ | ❌ | +| xslwriter | ✅ | ✅ | ❌ | ✅ | ## 查看 新增的扩展 和 移除的扩展 From 7fef348e2dcb102d34f41e760865f893396aa490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=BD=E5=90=A7=EF=BC=8C=E4=BD=A0=E6=83=B3=E8=AF=B4?= =?UTF-8?q?=E5=95=A5?= Date: Wed, 4 Dec 2024 07:40:29 +0800 Subject: [PATCH 3/4] fix enable xlswriter (#846) --- sapi/src/builder/enabled_extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/src/builder/enabled_extensions.php b/sapi/src/builder/enabled_extensions.php index 51ad3692ce..ba4519cda1 100644 --- a/sapi/src/builder/enabled_extensions.php +++ b/sapi/src/builder/enabled_extensions.php @@ -37,5 +37,5 @@ 'yaml', 'imagick', 'mongodb', - 'xslwriter' + 'xlswriter' ]; From 9723f24c48c558f19ca6f191869ed934671988e1 Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Thu, 5 Dec 2024 12:36:22 +0800 Subject: [PATCH 4/4] fix download swoole-cli runtime bug --- ext/swoole | 2 +- setup-swoole-cli-runtime.sh | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) 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