From cc025ab8d310f88830d44565791b6c6f844ec383 Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Wed, 1 Jan 2025 23:16:51 +0800 Subject: [PATCH 1/9] fix cygwin git error --- .github/workflows/windows-cygwin.yml | 1 + ext/swoole | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-cygwin.yml b/.github/workflows/windows-cygwin.yml index 36c8eb740e..fe3f55933b 100644 --- a/.github/workflows/windows-cygwin.yml +++ b/.github/workflows/windows-cygwin.yml @@ -22,6 +22,7 @@ jobs: git config --global core.autocrlf false git config --global core.eol lf git config --global core.ignorecase false + git config --global --add safe.directory ${{ github.workspace }} ipconfig - uses: actions/checkout@v4 diff --git a/ext/swoole b/ext/swoole index 3e1a1f8993..b3c548483f 160000 --- a/ext/swoole +++ b/ext/swoole @@ -1 +1 @@ -Subproject commit 3e1a1f89930ba0bbea1f5ee31bcd0ee701a87aab +Subproject commit b3c548483fa2ab65bd6de2bf856ff9ce3ef06c73 From 3a746e358b17144a9246c7ed9e195d0a9b08e0b4 Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Thu, 2 Jan 2025 17:36:16 +0800 Subject: [PATCH 2/9] pull main code --- .github/workflows/artifact-hash.yml | 6 ++-- .github/workflows/linux-aarch64.yml | 6 ++-- .github/workflows/linux-x86_64.yml | 6 ++-- .github/workflows/macos-aarch64.yml | 6 ++-- .github/workflows/macos-x86_64.yml | 6 ++-- .github/workflows/windows-cygwin.yml | 8 +++-- sapi/quickstart/linux/arm64/README.md | 21 +++++-------- .../linux/connection-swoole-cli-alpine.sh | 2 +- sapi/quickstart/linux/extra/README.md | 26 +++++++++------- .../linux/install-docker-compose.sh | 2 +- sapi/quickstart/linux/install-docker.sh | 12 +++---- .../linux/run-alpine-container-full.sh | 1 - sapi/quickstart/linux/run-alpine-container.sh | 7 ++--- sapi/quickstart/linux/run-debian-container.sh | 7 ++--- .../quickstart/windows/cygwin-build/README.md | 16 ---------- .../windows/cygwin-build/install-cygwin.bat | 7 ++--- .../{ => msys2-build}/download-msys2.bat | 0 .../{ => msys2-build}/install-msys2.md | 18 ----------- sapi/quickstart/windows/windows-native.md | 31 ------------------- sapi/quickstart/windows/windows.md | 27 ++++++++++++++++ sapi/scripts/cygwin/cygwin-build.sh | 9 ++++-- sapi/scripts/tencent-cloud-object-storage.sh | 17 +++++----- .../scripts/tencent-cloud-object-storage.yaml | 6 ++-- sapi/src/template/make.php | 2 +- 24 files changed, 111 insertions(+), 138 deletions(-) rename sapi/quickstart/windows/{ => msys2-build}/download-msys2.bat (100%) rename sapi/quickstart/windows/{ => msys2-build}/install-msys2.md (68%) delete mode 100644 sapi/quickstart/windows/windows-native.md create mode 100644 sapi/quickstart/windows/windows.md diff --git a/.github/workflows/artifact-hash.yml b/.github/workflows/artifact-hash.yml index 0bd72f7a79..f37ef90c3e 100644 --- a/.github/workflows/artifact-hash.yml +++ b/.github/workflows/artifact-hash.yml @@ -33,8 +33,10 @@ jobs: - name: upload artifacts to cloud object storage if: ${{ (github.repository == 'swoole/swoole-cli') && (inputs.enable_upload_cloud_object_storage == true) }} env: - SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} - SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} + OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }} + OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }} run: | bash sapi/scripts/tencent-cloud-object-storage.sh --upload-all --swoole-cli-version ${{ inputs.version }} diff --git a/.github/workflows/linux-aarch64.yml b/.github/workflows/linux-aarch64.yml index 2e32af10bc..f82265e8fd 100644 --- a/.github/workflows/linux-aarch64.yml +++ b/.github/workflows/linux-aarch64.yml @@ -198,7 +198,9 @@ jobs: - name: upload artifacts to cloud object storage if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }} env: - SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} - SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} + OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }} + OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }} run: | bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-linux-arm64.tar.xz diff --git a/.github/workflows/linux-x86_64.yml b/.github/workflows/linux-x86_64.yml index d051ae616d..d679e313df 100644 --- a/.github/workflows/linux-x86_64.yml +++ b/.github/workflows/linux-x86_64.yml @@ -201,7 +201,9 @@ jobs: - name: upload artifacts to cloud object storage if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }} env: - SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} - SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} + OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }} + OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }} run: | bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-linux-x64.tar.xz diff --git a/.github/workflows/macos-aarch64.yml b/.github/workflows/macos-aarch64.yml index 1047573e3e..7b62acae70 100644 --- a/.github/workflows/macos-aarch64.yml +++ b/.github/workflows/macos-aarch64.yml @@ -155,7 +155,9 @@ jobs: - name: upload artifacts to cloud object storage if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }} env: - SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} - SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} + OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }} + OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }} run: | bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-macos-arm64.tar.xz diff --git a/.github/workflows/macos-x86_64.yml b/.github/workflows/macos-x86_64.yml index c7df9b55c4..0da3bea035 100644 --- a/.github/workflows/macos-x86_64.yml +++ b/.github/workflows/macos-x86_64.yml @@ -158,7 +158,9 @@ jobs: - name: upload artifacts to cloud object storage if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }} env: - SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} - SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} + OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }} + OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }} run: | bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-macos-x64.tar.xz diff --git a/.github/workflows/windows-cygwin.yml b/.github/workflows/windows-cygwin.yml index c33892e66b..58ee6bfd95 100644 --- a/.github/workflows/windows-cygwin.yml +++ b/.github/workflows/windows-cygwin.yml @@ -77,7 +77,7 @@ jobs: run: | bash ./sapi/scripts/cygwin/install-re2c.sh - - name: Prepare + - name: Configure shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0} run: | # git config --global --add safe.directory /cygdrive/d/a/swoole-cli/swoole-cli @@ -160,8 +160,10 @@ jobs: - name: upload artifacts to cloud object storage if: ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }} env: - SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} - SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }} + OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }} + OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }} + OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }} run: | FILE_NAME=$(ls -d swoole-cli-v*-cygwin-x64) FILE="${{ github.workspace }}/${FILE_NAME}/${FILE_NAME}.zip" diff --git a/sapi/quickstart/linux/arm64/README.md b/sapi/quickstart/linux/arm64/README.md index d22e0344b3..8c4031d9a9 100644 --- a/sapi/quickstart/linux/arm64/README.md +++ b/sapi/quickstart/linux/arm64/README.md @@ -1,18 +1,13 @@ -# x86_64 运行 arm64 -> 使用 qemu-user-static 实现 +# 在 `x86_64` 平台模拟 `arm64` -## 参考文档 -qemu - https://www.qemu.org/ - https://github.com/qemu/qemu.git - -qemu-user-static - https://github.com/multiarch/qemu-user-static.git +使用 `qemu-user-static` 实现 -x86 平台利用 qemu-user-static 实现 arm64 平台 docker 镜像的运行和构建 - https://www.cnblogs.com/chen2ha/p/17180287.html +## 参考文档 -Docker在x86架构的物理机上跑Qemu-arm 容器 - https://blog.csdn.net/sunSHINEEzy/article/details/80015638 +- [qemu 官网](https://www.qemu.org/) +- [qemu GitHub](https://github.com/qemu/qemu.git) +- [qemu-user-static](https://github.com/multiarch/qemu-user-static.git) +- [x86 平台利用 qemu-user-static 实现 arm64 平台 docker 镜像的运行和构建](https://www.cnblogs.com/chen2ha/p/17180287.html) +- [Docker在x86架构的物理机上跑Qemu-arm 容器](https://blog.csdn.net/sunSHINEEzy/article/details/80015638) diff --git a/sapi/quickstart/linux/connection-swoole-cli-alpine.sh b/sapi/quickstart/linux/connection-swoole-cli-alpine.sh index e8720ba5bc..a90c7ed051 100644 --- a/sapi/quickstart/linux/connection-swoole-cli-alpine.sh +++ b/sapi/quickstart/linux/connection-swoole-cli-alpine.sh @@ -8,4 +8,4 @@ __DIR__=$( cd ${__DIR__} -docker exec -it swoole-cli-alpine-dev sh +docker exec -it woole-cli-builder sh diff --git a/sapi/quickstart/linux/extra/README.md b/sapi/quickstart/linux/extra/README.md index fb66c41799..ec65a7ea17 100644 --- a/sapi/quickstart/linux/extra/README.md +++ b/sapi/quickstart/linux/extra/README.md @@ -1,25 +1,27 @@ -# +# 常见问题 -## 当环境中没有 PHP 解释器时 可以快速安装 PHP 解释器 -```bash +## 快速安装 `PHP` 解释器 -# alpine +### Alpine -sh sapi/quickstart/linux/extra/alpine-php-init.sh +```bash +sh sapi/quickstart/linux/extra/alpine-php-init.sh +``` -## debian +### Debian/Ubuntu +```bash bash sapi/quickstart/linux/extra/debian-php-init.sh - ``` -```bash - wget -O composer.phar https://mirrors.aliyun.com/composer/composer.phar +## 安装 `Composer` +```bash +wget -O composer.phar https://mirrors.aliyun.com/composer/composer.phar ``` -## c c++编译器 组合 +## `C/C++` 编译器组合 -- 组合一 clang clang++ -- 组合二 gcc g++ +- `clang` + `clang++` +- `gcc` + `g++` diff --git a/sapi/quickstart/linux/install-docker-compose.sh b/sapi/quickstart/linux/install-docker-compose.sh index 68d5623866..830ed50268 100644 --- a/sapi/quickstart/linux/install-docker-compose.sh +++ b/sapi/quickstart/linux/install-docker-compose.sh @@ -24,7 +24,7 @@ if [ ! -f /usr/libexec/docker/cli-plugins/docker-compose ]; then # show more version info # https://github.com/docker/compose/releases - VERSION="v2.29.1" + VERSION="v2.32.1" curl -fsSL "https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose diff --git a/sapi/quickstart/linux/install-docker.sh b/sapi/quickstart/linux/install-docker.sh index ebdcf2a8ef..860c6f21a6 100644 --- a/sapi/quickstart/linux/install-docker.sh +++ b/sapi/quickstart/linux/install-docker.sh @@ -28,7 +28,6 @@ while [ $# -gt 0 ]; do shift $(($# > 0 ? 1 : 0)) done - # https://github.com/docker/docker-install.git # test -f get-docker.sh || curl -fsSL https://get.docker.com -o get-docker.sh @@ -41,14 +40,15 @@ china | ustc | tuna) ;; esac - if [ -n "$http_proxy" ] || [ -n "$https_proxy" ] || [ -n "$HTTP_PROXY" ] || [ -n "$HTTPS_PROXY" ]; then - echo 'Please delete proxy settings !' - echo 'Execute this script again !' - exit 0 + set +u + unset http_proxy + unset https_proxy + unset HTTP_PROXY + unset HTTPS_PROXY + set -u fi - case "$MIRROR" in china | ustc) sed -i "s@https://mirrors.aliyun.com/docker-ce@https://mirrors.ustc.edu.cn/docker-ce@g" get-docker.sh diff --git a/sapi/quickstart/linux/run-alpine-container-full.sh b/sapi/quickstart/linux/run-alpine-container-full.sh index 83039da380..27003d3697 100644 --- a/sapi/quickstart/linux/run-alpine-container-full.sh +++ b/sapi/quickstart/linux/run-alpine-container-full.sh @@ -12,7 +12,6 @@ __PROJECT__=$( cd ${__DIR__} { - docker stop swoole-cli-alpine-dev docker stop swoole-cli-builder sleep 5 } || { diff --git a/sapi/quickstart/linux/run-alpine-container.sh b/sapi/quickstart/linux/run-alpine-container.sh index be9ad82e56..c402ac11f2 100644 --- a/sapi/quickstart/linux/run-alpine-container.sh +++ b/sapi/quickstart/linux/run-alpine-container.sh @@ -12,7 +12,6 @@ __PROJECT__=$( cd ${__DIR__} { - docker stop swoole-cli-alpine-dev docker stop swoole-cli-builder sleep 5 } || { @@ -28,9 +27,9 @@ while [ $# -gt 0 ]; do --mirror) MIRROR="$2" case "$MIRROR" in - china | openatom) - IMAGE="hub.atomgit.com/library/alpine:3.18" - ;; + china | openatom) + IMAGE="hub.atomgit.com/library/alpine:3.18" + ;; esac ;; esac diff --git a/sapi/quickstart/linux/run-debian-container.sh b/sapi/quickstart/linux/run-debian-container.sh index 1e3768a605..b58527b544 100644 --- a/sapi/quickstart/linux/run-debian-container.sh +++ b/sapi/quickstart/linux/run-debian-container.sh @@ -27,15 +27,14 @@ while [ $# -gt 0 ]; do --mirror) MIRROR="$2" case "$MIRROR" in - china | openatom) - IMAGE="hub.atomgit.com/library/debian:12" - ;; + china | openatom) + IMAGE="hub.atomgit.com/library/debian:12" + ;; esac ;; esac shift $(($# > 0 ? 1 : 0)) done - cd ${__DIR__} docker run --rm --name swoole-cli-debian-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null diff --git a/sapi/quickstart/windows/cygwin-build/README.md b/sapi/quickstart/windows/cygwin-build/README.md index b66e60f7f2..7008106bc5 100644 --- a/sapi/quickstart/windows/cygwin-build/README.md +++ b/sapi/quickstart/windows/cygwin-build/README.md @@ -14,21 +14,5 @@ sapi\quickstart\windows\cygwin-build\install-cygwin.bat ``` -# windows 软连接例子 - -```bash - -mklink composer composer.phar - -``` - -## 其他 - -1. [windows build native php](./windows-native.md) -1. [install msys2 ](./install-msys2.md) - - - - diff --git a/sapi/quickstart/windows/cygwin-build/install-cygwin.bat b/sapi/quickstart/windows/cygwin-build/install-cygwin.bat index 77a9548927..947c6fa2d4 100644 --- a/sapi/quickstart/windows/cygwin-build/install-cygwin.bat +++ b/sapi/quickstart/windows/cygwin-build/install-cygwin.bat @@ -1,18 +1,20 @@ @echo off + :: cygwin site: https://cygwin.com/ :: start https://cygwin.com/setup-x86_64.exe setlocal enableextensions enabledelayedexpansion - echo %~dp0 cd /d %~dp0 cd /d ..\..\..\..\ set "__PROJECT__=%cd%" +cd /d %__PROJECT__%\ echo %cd% :: package separate with commas + set SITE="https://mirrors.kernel.org/sourceware/cygwin/" :getopt @@ -29,7 +31,6 @@ if "%GITHUB_ACTIONS%"=="" ( setup-x86_64.exe --quiet-mode --disable-buggy-antivirus --site %SITE% ) - setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site %SITE% --packages make,git,curl,wget,tar,libtool,bison,gcc-g++,autoconf,automake,openssl,libpcre2-devel,libssl-devel,libcurl-devel,libxml2-devel,libxslt-devel,libgmp-devel,ImageMagick,libpng-devel,libjpeg-devel,libfreetype-devel,libwebp-devel,libsqlite3-devel,zlib-devel,libbz2-devel,liblz4-devel,liblzma-devel,libzip-devel,libicu-devel,libonig-devel,libcares-devel,libsodium-devel,libyaml-devel,libMagick-devel,libzstd-devel,libbrotli-devel,libreadline-devel,libintl-devel,libpq-devel,libssh2-devel,libidn2-devel,gettext-devel,coreutils setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site %SITE% --packages zip unzip @@ -38,6 +39,4 @@ setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disa setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site %SITE% --packages libzstd-devel - - endlocal diff --git a/sapi/quickstart/windows/download-msys2.bat b/sapi/quickstart/windows/msys2-build/download-msys2.bat similarity index 100% rename from sapi/quickstart/windows/download-msys2.bat rename to sapi/quickstart/windows/msys2-build/download-msys2.bat diff --git a/sapi/quickstart/windows/install-msys2.md b/sapi/quickstart/windows/msys2-build/install-msys2.md similarity index 68% rename from sapi/quickstart/windows/install-msys2.md rename to sapi/quickstart/windows/msys2-build/install-msys2.md index 229f54fe44..4b7f64326c 100644 --- a/sapi/quickstart/windows/install-msys2.md +++ b/sapi/quickstart/windows/msys2-build/install-msys2.md @@ -37,23 +37,5 @@ pacman -Syy --noconfirm openssl-devel libreadline # msys2 环境下 拉取 swoole-cli 源码 git clone --recursive https://github.com:swoole/swoole-cli.git -# msys2 环境下下载 cygwin (也可以用浏览器下载) 安装包 -wget https://cygwin.com/setup-x86_64.exe - -# 将 cygwin 安装包 移动到 window 指定盘符根目 (这里以 C盘为例) -mv setup-x86_64.exe C:/setup-x86_64.exe - - ``` -### windows 自带默认终端 - -```shell - -# windows 开始菜单,打开 新的 windows 自带终端,执行安装 cygwin -cd c:\ - -# 添加 pgsql -setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site https://mirrors.ustc.edu.cn/cygwin/ --packages libpq5 libpq-deve - -``` diff --git a/sapi/quickstart/windows/windows-native.md b/sapi/quickstart/windows/windows-native.md deleted file mode 100644 index 718f8acb53..0000000000 --- a/sapi/quickstart/windows/windows-native.md +++ /dev/null @@ -1,31 +0,0 @@ -# 构建window PHP 工具 和 参考 - -[ download windows PHP ](https://windows.php.net/download#php-8.2) - -[windows build php 步骤](https://wiki.php.net/internals/windows/stepbystepbuild) - -```shell -git config core.ignorecase false # 设置 Git 在 Windows 上也区分大小写 -``` - -Latest VC++ -https://learn.microsoft.com/en-AU/cpp/windows/latest-supported-vc-redist - -7zip -https://7-zip.org/ - -visualstudio -https://visualstudio.microsoft.com/zh-hans/downloads/ - -windows-sdk -https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ - -Windows PowerShell ISE 文本编辑器 - -## 使用命令行快速安装 VisualStudio 组件 - -```shell - -VisualStudioSetup.exe --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended - -``` diff --git a/sapi/quickstart/windows/windows.md b/sapi/quickstart/windows/windows.md new file mode 100644 index 0000000000..7911036e98 --- /dev/null +++ b/sapi/quickstart/windows/windows.md @@ -0,0 +1,27 @@ +# 构建window PHP 工具 和 参考 + +[download windows PHP ](https://windows.php.net/download#php-8.2) + +[windows build php 步骤](https://wiki.php.net/internals/windows/stepbystepbuild) + +## windows 环境下 git 配置 + +```shell +git config --global core.autocrlf false +git config --global core.eol lf +git config --global core.ignorecase false +git config core.ignorecase false # 设置 Git 在 Windows 上也区分大小写 +``` + +[Latest VC++](https://learn.microsoft.com/en-AU/cpp/windows/latest-supported-vc-redist) +[7zip](https://7-zip.org/) +[visualstudio](https://visualstudio.microsoft.com/zh-hans/downloads/) +[windows-sdk](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) + +## windows 软连接例子 + +```bash + +mklink composer composer.phar + +``` diff --git a/sapi/scripts/cygwin/cygwin-build.sh b/sapi/scripts/cygwin/cygwin-build.sh index 9ed4bdda1b..934f8df045 100755 --- a/sapi/scripts/cygwin/cygwin-build.sh +++ b/sapi/scripts/cygwin/cygwin-build.sh @@ -18,13 +18,16 @@ LOGICAL_PROCESSORS=$(nproc) set +u if [ -n "${GITHUB_ACTION}" ]; then - if test $LOGICAL_PROCESSORS -gt 2; then - LOGICAL_PROCESSORS=$((LOGICAL_PROCESSORS - 1)) + if test $LOGICAL_PROCESSORS -ge 4; then + LOGICAL_PROCESSORS=$((LOGICAL_PROCESSORS - 2)) fi + make + # make -j $LOGICAL_PROCESSORS +else + make -j $LOGICAL_PROCESSORS fi set -u -make -j $LOGICAL_PROCESSORS ./bin/swoole-cli -v ./bin/swoole-cli -m ./bin/swoole-cli --ri swoole diff --git a/sapi/scripts/tencent-cloud-object-storage.sh b/sapi/scripts/tencent-cloud-object-storage.sh index 00aa875982..ad3522bc03 100644 --- a/sapi/scripts/tencent-cloud-object-storage.sh +++ b/sapi/scripts/tencent-cloud-object-storage.sh @@ -85,7 +85,7 @@ while [ $# -gt 0 ]; do export NO_PROXY="${NO_PROXY},.myqcloud.com,.swoole.com" PROXY_OPTION="--proxy $2" ;; - --show-uploaded-file-list) + --show) UPLOAD_TYPE="show" ;; esac @@ -99,9 +99,11 @@ CLOUD_OBJECT_STORAGE_CONFIG=${__PROJECT__}/var/tencent-cloud-object-storage/.ten if [ ! -f ${CLOUD_OBJECT_STORAGE_CONFIG} ]; then cp -f ${__PROJECT__}/sapi/scripts/tencent-cloud-object-storage.yaml ${CLOUD_OBJECT_STORAGE_CONFIG} set +u - if [ -n "${SECRET_ID}" ] && [ -n "${SECRET_KEY}" ]; then - sed -i.bak "s/\${{ secrets.QCLOUD_OSS_SECRET_ID }}/${SECRET_ID}/" ${CLOUD_OBJECT_STORAGE_CONFIG} - sed -i.bak "s/\${{ secrets.QCLOUD_OSS_SECRET_KEY }}/${SECRET_KEY}/" ${CLOUD_OBJECT_STORAGE_CONFIG} + if [ -n "${OSS_SECRET_ID}" ] && [ -n "${OSS_SECRET_KEY}" ]; then + sed -i.bak "s/\${{ secrets.QCLOUD_OSS_SECRET_ID }}/${OSS_SECRET_ID}/" ${CLOUD_OBJECT_STORAGE_CONFIG} + sed -i.bak "s/\${{ secrets.QCLOUD_OSS_SECRET_KEY }}/${OSS_SECRET_KEY}/" ${CLOUD_OBJECT_STORAGE_CONFIG} + sed -i.bak "s/\${{ vars.QCLOUD_OSS_BUCKET }}/${OSS_BUCKET}/" ${CLOUD_OBJECT_STORAGE_CONFIG} + sed -i.bak "s/\${{ vars.QCLOUD_OSS_REGION }}/${OSS_REGION}/" ${CLOUD_OBJECT_STORAGE_CONFIG} fi set -u fi @@ -113,8 +115,9 @@ fi test -f ${APP_RUNTIME} || curl -fSLo ${APP_RUNTIME} https://github.com/tencentyun/coscli/releases/download/${APP_VERSION}/${APP_RUNTIME} chmod a+x ${APP_RUNTIME} +BUCKET_NAME=$(grep "\- name: " ${CLOUD_OBJECT_STORAGE_CONFIG} | sed 's/\- name: //g' | sed 's/^ *//;s/ *$//' | tr -d '"') COSCLI="${__PROJECT__}/var/tencent-cloud-object-storage/${APP_RUNTIME} --config-path ${CLOUD_OBJECT_STORAGE_CONFIG} --log-path ${__PROJECT__}/var/tencent-cloud-object-storage/coscli.log " -COS_BUCKET_FOLDER="cos://wenda-1252906962/dist/" +COS_BUCKET_FOLDER="cos://${BUCKET_NAME}/dist/" if [ "${UPLOAD_TYPE}" == 'all' ]; then if [ ! -d ${__PROJECT__}/var/artifact-hash/${SWOOLE_CLI_VERSION} ]; then @@ -147,8 +150,8 @@ if [ "${UPLOAD_TYPE}" == 'single' ]; then fi if [ "${UPLOAD_TYPE}" == 'show' ]; then - cat ${CLOUD_OBJECT_STORAGE_CONFIG} - ${COSCLI} --help + # cat ${CLOUD_OBJECT_STORAGE_CONFIG} + # ${COSCLI} --help ${COSCLI} ls ${COS_BUCKET_FOLDER} exit 0 fi diff --git a/sapi/scripts/tencent-cloud-object-storage.yaml b/sapi/scripts/tencent-cloud-object-storage.yaml index e7acfed053..dc7e963fb0 100644 --- a/sapi/scripts/tencent-cloud-object-storage.yaml +++ b/sapi/scripts/tencent-cloud-object-storage.yaml @@ -8,9 +8,9 @@ cos: cvmrolename: "" closeautoswitchhost: "true" buckets: - - name: "wenda-1252906962" - alias: "wenda-1252906962" - region: "ap-shanghai" + - name: "${{ vars.QCLOUD_OSS_BUCKET }}" + alias: "${{ vars.QCLOUD_OSS_BUCKET }}" + region: "${{ vars.QCLOUD_OSS_REGION }}" # endpoint: cos.ap-shanghai.myqcloud.com # endpoint: wenda-1252906962.cos.accelerate.myqcloud.com endpoint: "cos.accelerate.myqcloud.com" diff --git a/sapi/src/template/make.php b/sapi/src/template/make.php index 0614192ffa..73bbc50f82 100755 --- a/sapi/src/template/make.php +++ b/sapi/src/template/make.php @@ -1,4 +1,3 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash __PROJECT_DIR__=$(cd "$(dirname "$0")"; pwd) CLI_BUILD_TYPE=getBuildType() . PHP_EOL ?> SRC=phpSrcDir . PHP_EOL ?> From 219f6c18469be36bfb27699392131ba9c906dd14 Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Thu, 2 Jan 2025 18:31:39 +0800 Subject: [PATCH 3/9] fix quickstart connection continer bug --- sapi/quickstart/linux/connection-swoole-cli-alpine.sh | 2 +- sapi/quickstart/linux/run-alpine-container-full.sh | 6 +++--- sapi/quickstart/linux/run-alpine-container.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sapi/quickstart/linux/connection-swoole-cli-alpine.sh b/sapi/quickstart/linux/connection-swoole-cli-alpine.sh index a90c7ed051..e8720ba5bc 100644 --- a/sapi/quickstart/linux/connection-swoole-cli-alpine.sh +++ b/sapi/quickstart/linux/connection-swoole-cli-alpine.sh @@ -8,4 +8,4 @@ __DIR__=$( cd ${__DIR__} -docker exec -it woole-cli-builder sh +docker exec -it swoole-cli-alpine-dev sh diff --git a/sapi/quickstart/linux/run-alpine-container-full.sh b/sapi/quickstart/linux/run-alpine-container-full.sh index 27003d3697..eedb20d6e1 100644 --- a/sapi/quickstart/linux/run-alpine-container-full.sh +++ b/sapi/quickstart/linux/run-alpine-container-full.sh @@ -12,7 +12,7 @@ __PROJECT__=$( cd ${__DIR__} { - docker stop swoole-cli-builder + docker stop swoole-cli-alpine-dev sleep 5 } || { echo $? @@ -73,7 +73,7 @@ cd ${__DIR__} if [ $DEV_SHM -eq 1 ]; then mkdir -p /dev/shm/swoole-cli/thirdparty/ mkdir -p /dev/shm/swoole-cli/ext/ - docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -v /dev/shm/swoole-cli/thirdparty/:/work/thirdparty/ -v /dev/shm/swoole-cli/ext/:/work/ext/ -w /work --init $IMAGE tail -f /dev/null + docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -v /dev/shm/swoole-cli/thirdparty/:/work/thirdparty/ -v /dev/shm/swoole-cli/ext/:/work/ext/ -w /work --init $IMAGE tail -f /dev/null else - docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null + docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null fi diff --git a/sapi/quickstart/linux/run-alpine-container.sh b/sapi/quickstart/linux/run-alpine-container.sh index c402ac11f2..eaa0b4fb7b 100644 --- a/sapi/quickstart/linux/run-alpine-container.sh +++ b/sapi/quickstart/linux/run-alpine-container.sh @@ -12,7 +12,7 @@ __PROJECT__=$( cd ${__DIR__} { - docker stop swoole-cli-builder + docker stop swoole-cli-alpine-dev sleep 5 } || { echo $? @@ -37,4 +37,4 @@ while [ $# -gt 0 ]; do done cd ${__DIR__} -docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null +docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null From 2e191d40a68b606dfe40c4b3671ef0d504a9b7af Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Thu, 2 Jan 2025 18:57:05 +0800 Subject: [PATCH 4/9] fix quickstart connection swoole-cli-buider bug --- sapi/quickstart/linux/run-alpine-container.sh | 2 +- sapi/quickstart/linux/run-debian-container.sh | 2 +- .../linux/run-swoole-cli-builder-container.sh | 47 +++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 sapi/quickstart/linux/run-swoole-cli-builder-container.sh diff --git a/sapi/quickstart/linux/run-alpine-container.sh b/sapi/quickstart/linux/run-alpine-container.sh index eaa0b4fb7b..b2c8f09b27 100644 --- a/sapi/quickstart/linux/run-alpine-container.sh +++ b/sapi/quickstart/linux/run-alpine-container.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -exu __DIR__=$( diff --git a/sapi/quickstart/linux/run-debian-container.sh b/sapi/quickstart/linux/run-debian-container.sh index b58527b544..c2fe991bcb 100644 --- a/sapi/quickstart/linux/run-debian-container.sh +++ b/sapi/quickstart/linux/run-debian-container.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -exu __DIR__=$( diff --git a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh new file mode 100644 index 0000000000..4614188d61 --- /dev/null +++ b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +set -exu +__DIR__=$( + cd "$(dirname "$0")" + pwd +) +__PROJECT__=$( + cd ${__DIR__}/../../../ + pwd +) +cd ${__PROJECT__} + +MIRROR='' +while [ $# -gt 0 ]; do + case "$1" in + --mirror) + case "$MIRROR" in + china) + MIRROR="$2" + ;; + esac + + ;; + esac + shift $(($# > 0 ? 1 : 0)) +done + +bash setup-php-runtime.sh ${MIRROR} +export PATH=${__PROJECT__}/bin/runtime:$PATH +alias php="php -d curl.cainfo=${__PROJECT__}/bin/runtime/cacert.pem -d openssl.cafile=${__PROJECT__}/bin/runtime/cacert.pem " + +if [ "$MIRROR" = 'china' ]; then + composer config -g repos.packagist composer https://mirrors.tencent.com/composer/ +fi + +composer install --no-interaction --no-autoloader --no-scripts --prefer-dist -vv --profile # --no-dev +composer dump-autoload --optimize --profile + +if [ "$MIRROR" = 'china' ]; then + composer config -g --unset repos.packagist +fi + +php ./prepare.php --skip-download=yes --without-docker=yes + +bash make.sh docker-build ${MIRROR} +bash make.sh docker-bash From 7de64c7eafbbd4b6df3e4e3e3ef87002ed2663b8 Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Thu, 2 Jan 2025 20:07:57 +0800 Subject: [PATCH 5/9] optimize --- sapi/quickstart/linux/run-swoole-cli-builder-container.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh index 4614188d61..0086bd38e3 100644 --- a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh +++ b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh @@ -12,12 +12,14 @@ __PROJECT__=$( cd ${__PROJECT__} MIRROR='' +OPTIONS='' while [ $# -gt 0 ]; do case "$1" in --mirror) case "$MIRROR" in china) MIRROR="$2" + OPTIONS=" --mirror china " ;; esac @@ -26,7 +28,7 @@ while [ $# -gt 0 ]; do shift $(($# > 0 ? 1 : 0)) done -bash setup-php-runtime.sh ${MIRROR} +bash setup-php-runtime.sh ${OPTIONS} export PATH=${__PROJECT__}/bin/runtime:$PATH alias php="php -d curl.cainfo=${__PROJECT__}/bin/runtime/cacert.pem -d openssl.cafile=${__PROJECT__}/bin/runtime/cacert.pem " From a3191b7e9437367602d9f38281133e57731add3f 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: Fri, 3 Jan 2025 06:27:09 +0800 Subject: [PATCH 6/9] fix cygwin git error (#899) --- .github/workflows/windows-cygwin.yml | 1 + ext/swoole | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-cygwin.yml b/.github/workflows/windows-cygwin.yml index 36c8eb740e..fe3f55933b 100644 --- a/.github/workflows/windows-cygwin.yml +++ b/.github/workflows/windows-cygwin.yml @@ -22,6 +22,7 @@ jobs: git config --global core.autocrlf false git config --global core.eol lf git config --global core.ignorecase false + git config --global --add safe.directory ${{ github.workspace }} ipconfig - uses: actions/checkout@v4 diff --git a/ext/swoole b/ext/swoole index 3e1a1f8993..b3c548483f 160000 --- a/ext/swoole +++ b/ext/swoole @@ -1 +1 @@ -Subproject commit 3e1a1f89930ba0bbea1f5ee31bcd0ee701a87aab +Subproject commit b3c548483fa2ab65bd6de2bf856ff9ce3ef06c73 From 7c8725e9e2c2a9a69816b2f2f8e33b81cd41d46a 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: Fri, 3 Jan 2025 06:27:40 +0800 Subject: [PATCH 7/9] Fix quickstart connection swoole-cli-builder bug (#902) * fix quickstart connection continer bug * fix quickstart connection swoole-cli-buider bug * optimize --- .../linux/connection-swoole-cli-alpine.sh | 2 +- .../linux/run-alpine-container-full.sh | 6 +-- sapi/quickstart/linux/run-alpine-container.sh | 6 +-- sapi/quickstart/linux/run-debian-container.sh | 2 +- .../linux/run-swoole-cli-builder-container.sh | 49 +++++++++++++++++++ 5 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 sapi/quickstart/linux/run-swoole-cli-builder-container.sh diff --git a/sapi/quickstart/linux/connection-swoole-cli-alpine.sh b/sapi/quickstart/linux/connection-swoole-cli-alpine.sh index a90c7ed051..e8720ba5bc 100644 --- a/sapi/quickstart/linux/connection-swoole-cli-alpine.sh +++ b/sapi/quickstart/linux/connection-swoole-cli-alpine.sh @@ -8,4 +8,4 @@ __DIR__=$( cd ${__DIR__} -docker exec -it woole-cli-builder sh +docker exec -it swoole-cli-alpine-dev sh diff --git a/sapi/quickstart/linux/run-alpine-container-full.sh b/sapi/quickstart/linux/run-alpine-container-full.sh index 27003d3697..eedb20d6e1 100644 --- a/sapi/quickstart/linux/run-alpine-container-full.sh +++ b/sapi/quickstart/linux/run-alpine-container-full.sh @@ -12,7 +12,7 @@ __PROJECT__=$( cd ${__DIR__} { - docker stop swoole-cli-builder + docker stop swoole-cli-alpine-dev sleep 5 } || { echo $? @@ -73,7 +73,7 @@ cd ${__DIR__} if [ $DEV_SHM -eq 1 ]; then mkdir -p /dev/shm/swoole-cli/thirdparty/ mkdir -p /dev/shm/swoole-cli/ext/ - docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -v /dev/shm/swoole-cli/thirdparty/:/work/thirdparty/ -v /dev/shm/swoole-cli/ext/:/work/ext/ -w /work --init $IMAGE tail -f /dev/null + docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -v /dev/shm/swoole-cli/thirdparty/:/work/thirdparty/ -v /dev/shm/swoole-cli/ext/:/work/ext/ -w /work --init $IMAGE tail -f /dev/null else - docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null + docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null fi diff --git a/sapi/quickstart/linux/run-alpine-container.sh b/sapi/quickstart/linux/run-alpine-container.sh index c402ac11f2..b2c8f09b27 100644 --- a/sapi/quickstart/linux/run-alpine-container.sh +++ b/sapi/quickstart/linux/run-alpine-container.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -exu __DIR__=$( @@ -12,7 +12,7 @@ __PROJECT__=$( cd ${__DIR__} { - docker stop swoole-cli-builder + docker stop swoole-cli-alpine-dev sleep 5 } || { echo $? @@ -37,4 +37,4 @@ while [ $# -gt 0 ]; do done cd ${__DIR__} -docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null +docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null diff --git a/sapi/quickstart/linux/run-debian-container.sh b/sapi/quickstart/linux/run-debian-container.sh index b58527b544..c2fe991bcb 100644 --- a/sapi/quickstart/linux/run-debian-container.sh +++ b/sapi/quickstart/linux/run-debian-container.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -exu __DIR__=$( diff --git a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh new file mode 100644 index 0000000000..0086bd38e3 --- /dev/null +++ b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +set -exu +__DIR__=$( + cd "$(dirname "$0")" + pwd +) +__PROJECT__=$( + cd ${__DIR__}/../../../ + pwd +) +cd ${__PROJECT__} + +MIRROR='' +OPTIONS='' +while [ $# -gt 0 ]; do + case "$1" in + --mirror) + case "$MIRROR" in + china) + MIRROR="$2" + OPTIONS=" --mirror china " + ;; + esac + + ;; + esac + shift $(($# > 0 ? 1 : 0)) +done + +bash setup-php-runtime.sh ${OPTIONS} +export PATH=${__PROJECT__}/bin/runtime:$PATH +alias php="php -d curl.cainfo=${__PROJECT__}/bin/runtime/cacert.pem -d openssl.cafile=${__PROJECT__}/bin/runtime/cacert.pem " + +if [ "$MIRROR" = 'china' ]; then + composer config -g repos.packagist composer https://mirrors.tencent.com/composer/ +fi + +composer install --no-interaction --no-autoloader --no-scripts --prefer-dist -vv --profile # --no-dev +composer dump-autoload --optimize --profile + +if [ "$MIRROR" = 'china' ]; then + composer config -g --unset repos.packagist +fi + +php ./prepare.php --skip-download=yes --without-docker=yes + +bash make.sh docker-build ${MIRROR} +bash make.sh docker-bash From 1d822958e5caf17ad88eb39328c8ba958ea5d175 Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Fri, 3 Jan 2025 20:27:37 +0800 Subject: [PATCH 8/9] fix run-swoole-cli-buider-bug --- sapi/quickstart/linux/run-swoole-cli-builder-container.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh index 0086bd38e3..70f1f8c004 100644 --- a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh +++ b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh @@ -16,11 +16,15 @@ OPTIONS='' while [ $# -gt 0 ]; do case "$1" in --mirror) + MIRROR="$2" case "$MIRROR" in china) - MIRROR="$2" OPTIONS=" --mirror china " ;; + *) + echo "$0 parameter error" + exit 0 + ;; esac ;; @@ -32,6 +36,8 @@ bash setup-php-runtime.sh ${OPTIONS} export PATH=${__PROJECT__}/bin/runtime:$PATH alias php="php -d curl.cainfo=${__PROJECT__}/bin/runtime/cacert.pem -d openssl.cafile=${__PROJECT__}/bin/runtime/cacert.pem " +export COMPOSER_ALLOW_SUPERUSER=1 + if [ "$MIRROR" = 'china' ]; then composer config -g repos.packagist composer https://mirrors.tencent.com/composer/ fi From ba8352a5d388a6c2a2598376983b9cfadea2191a Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Fri, 3 Jan 2025 20:57:36 +0800 Subject: [PATCH 9/9] =?UTF-8?q?quickstart=20run-swoole-cli-builder.sh=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapi/quickstart/linux/run-swoole-cli-builder-container.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh index 70f1f8c004..a91021e404 100644 --- a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh +++ b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh @@ -52,4 +52,11 @@ fi php ./prepare.php --skip-download=yes --without-docker=yes bash make.sh docker-build ${MIRROR} + +{ + docker exec -it swoole-cli-builder which bash +} || { + docker exec -it swoole-cli-builder sh /work/sapi/quickstart/linux/alpine-init.sh ${OPTIONS} +} + bash make.sh docker-bash