Skip to content

Commit 12ee1ac

Browse files
committed
update install-runtime.sh and update to 2.5
1 parent 0f001df commit 12ee1ac

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "composer project of zhamao-framework-starter",
44
"minimum-stability": "stable",
55
"license": "Apache-2.0",
6-
"version": "2.4",
6+
"version": "2.5",
77
"type": "project",
88
"prefer-stable": true,
99
"require": {

install-runtime.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,20 @@ function test_composer_and_php() {
3333
return 0
3434
}
3535

36+
if [ "$(uname -s)" != "Linux" ]; then
37+
echo "Only support Linux!!!"
38+
exit 1
39+
fi
40+
41+
ZM_PHP_VERSION="7.4"
42+
if [ "$ZM_DOWN_PHP_VERSION" != "" ]; then
43+
ZM_PHP_VERSION="$ZM_DOWN_PHP_VERSION"
44+
echo "Using custom PHP version: $ZM_PHP_VERSION"
45+
fi
46+
3647
mkdir "$(pwd)/runtime" >/dev/null 2>&1
3748
if [ ! -f "$(pwd)/runtime/php" ]; then
38-
download_file "https://dl.zhamao.me/php-bin/down.php?php_ver=7.4&arch=$(uname -m)" "$(pwd)/runtime/php.tar.gz"
49+
download_file "https://dl.zhamao.me/php-bin/down.php?php_ver=$ZM_PHP_VERSION&arch=$(uname -m)" "$(pwd)/runtime/php.tar.gz"
3950
if [ $? -ne 0 ]; then
4051
exit 1
4152
fi

0 commit comments

Comments
 (0)