Skip to content

Commit

Permalink
Merge pull request #794 from jingjingxyk/experiment-feature
Browse files Browse the repository at this point in the history
Experiment feature
  • Loading branch information
jingjingxyk authored Oct 6, 2024
2 parents 3fcd2fe + c2dc3be commit 23b1af3
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,8 @@ Makefile.backup
ldflags.log
cppflags.log
libs.log
ext/apcu/
ext/ssh2/
LICENSE


17 changes: 8 additions & 9 deletions build-release-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ ! -d ext/swoole/.git ]; then
git submodule update --init --recursive
fi

set -xue
set -x

# shellcheck disable=SC2034
OS=$(uname -s)
Expand Down Expand Up @@ -194,6 +194,7 @@ if [ ${WITH_PHP_COMPOSER} -eq 1 ]; then
composer config -g --unset repos.packagist
fi


# 可用配置参数
# --with-swoole-pgsql=1
# --with-libavif=1
Expand Down Expand Up @@ -259,6 +260,8 @@ if [ "$OS" = 'linux' ] && [ ${IN_DOCKER} -eq 0 ]; then
exit 0
fi

set -ue

bash make-install-deps.sh

# 兼容上一版本已构建完毕的依赖库
Expand All @@ -275,18 +278,14 @@ bash make.sh archive
exit 0

# 例子
# bash build-release.sh --mirror china
# bash build-release.sh --mirror china --debug
# bash build-release-php.sh --mirror china
# bash build-release-php.sh --mirror china --debug

# 例子 download-box
# bash build-release.sh --mirror china --download-box
# bash build-release-php.sh --mirror china --download-box
# bash sapi/download-box/download-box-init.sh --proxy http://192.168.3.26:8015

# 例子 build-contianer
# bash build-release.sh --mirror china --build-contianer
# bash sapi/multistage-build-dependencies-container/all-dependencies-build-container.sh --composer_mirror tencent --mirror ustc

# 例子 web ui
# bash build-release.sh --mirror china --webui
# bash build-release-php.sh --mirror china --webui
# bash sapi/webUI/webui-init-data.sh
# php sapi/webUI/bootstrap.php
22 changes: 22 additions & 0 deletions sapi/quickstart/linux/conatiner-sync-swoole-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -exu
__DIR__=$(
cd "$(dirname "$0")"
pwd
)
cd ${__DIR__}

# 容器之间同步 /usr/local/swoole-cli 目录

test -d /tmp/swoole-cli-builder && rm -rf /tmp/swoole-cli-builder

docker cp swoole-cli-alpine-dev:/usr/local/swoole-cli/ /tmp/swoole-cli-builder

docker cp /tmp/swoole-cli-builder swoole-cli-builder:/usr/local/swoole-cli


# docker cp /tmp/swoole-cli-builder swoole-cli-alpine-dev:/usr/local/swoole-cli

# 运行的容器挂载目录
# docker exec -it swoole-cli-builder mount --bind /tmp/swoole-cli-builder /usr/local/swoole-cli/
2 changes: 1 addition & 1 deletion sapi/src/builder/enabled_extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
'swoole',
'yaml',
'imagick',
//'mongodb',
'mongodb',
//'gettext',
'uuid'
];
1 change: 1 addition & 0 deletions sapi/src/builder/extension/imagick.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
->withMd5sum('f7b5e9b23fb844e5eb035203d316bc63')
->withDependentLibraries('imagemagick')
->withDependentExtensions('tokenizer')
->withBuildCached(false)
);
};

Expand Down
1 change: 1 addition & 0 deletions sapi/src/builder/extension/swoole_latest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
)
->withOptions(implode(' ', $options))
->withBuildCached(false)
->withAutoUpdateFile()
->withDependentLibraries(...$dependentLibraries)
->withDependentExtensions(...$dependentExtensions));

Expand Down
2 changes: 1 addition & 1 deletion sapi/src/builder/library/gettext.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
->withUrl('https://ftpmirror.gnu.org/gettext/gettext-0.22.5.tar.gz')
->withFileHash('sha256',"ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0")
->withPrefix($gettext_prefix)
->withInstallCached(false)
//->withInstallCached(false)
->withConfigure(
<<<EOF
Expand Down

0 comments on commit 23b1af3

Please sign in to comment.