forked from swoole/swoole-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
77 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ __DIR__=$( | |
|
||
cd ${__DIR__} | ||
|
||
docker exec -it woole-cli-builder sh | ||
docker exec -it swoole-cli-alpine-dev sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
set -exu | ||
__DIR__=$( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/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) | ||
MIRROR="$2" | ||
case "$MIRROR" in | ||
china) | ||
OPTIONS=" --mirror china " | ||
;; | ||
*) | ||
echo "$0 parameter error" | ||
exit 0 | ||
;; | ||
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 " | ||
|
||
export COMPOSER_ALLOW_SUPERUSER=1 | ||
|
||
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} | ||
|
||
{ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ | |
### cygwin mirror | ||
|
||
https://cygwin.com/mirrors.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters