Skip to content

Commit

Permalink
fix quickstart connection swoole-cli-buider bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Jan 2, 2025
1 parent 219f6c1 commit 2e191d4
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sapi/quickstart/linux/run-alpine-container.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -exu
__DIR__=$(
Expand Down
2 changes: 1 addition & 1 deletion sapi/quickstart/linux/run-debian-container.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -exu
__DIR__=$(
Expand Down
47 changes: 47 additions & 0 deletions sapi/quickstart/linux/run-swoole-cli-builder-container.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2e191d4

Please sign in to comment.