Skip to content

Commit

Permalink
update download runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Dec 5, 2024
1 parent 08ab53b commit f5b609e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
16 changes: 14 additions & 2 deletions setup-php-cli-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ while [ $# -gt 0 ]; do
;;
--version)
# 指定发布 TAG
X_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}$')
if [ $OS = "macos" ]; then
X_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}$')
elif [ $OS = "linux" ]; then
X_VERSION=$(echo "$2" | grep -Po '^v\d\.\d{1,2}\.\d{1,2}$')
else
X_VERSION=''
fi
if [[ -n $X_VERSION ]]; then
{
VERSION=$X_VERSION
Expand All @@ -82,7 +88,13 @@ while [ $# -gt 0 ]; do
;;
--php-version)
# 指定发布 TAG
X_APP_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}$')
if [ $OS = "macos" ]; then
X_APP_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}$')
elif [ $OS = "linux" ]; then
X_APP_VERSION=$(echo "$2" | grep -Po '^v\d\.\d{1,2}\.\d{1,2}$')
else
X_VERSION=''
fi
if [[ -n $X_APP_VERSION ]]; then
{
APP_VERSION=$X_APP_VERSION
Expand Down
16 changes: 14 additions & 2 deletions setup-php-fpm-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ while [ $# -gt 0 ]; do
;;
--version)
# 指定发布 TAG
X_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}$')
if [ $OS = "macos" ]; then
X_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}$')
elif [ $OS = "linux" ]; then
X_VERSION=$(echo "$2" | grep -Po '^v\d\.\d{1,2}\.\d{1,2}$')
else
X_VERSION=''
fi
if [[ -n $X_VERSION ]]; then
{
VERSION=$X_VERSION
Expand All @@ -82,7 +88,13 @@ while [ $# -gt 0 ]; do
;;
--php-version)
# 指定发布 TAG
X_APP_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}$')
if [ $OS = "macos" ]; then
X_APP_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}$')
elif [ $OS = "linux" ]; then
X_APP_VERSION=$(echo "$2" | grep -Po '^v\d\.\d{1,2}\.\d{1,2}$')
else
X_VERSION=''
fi
if [[ -n $X_APP_VERSION ]]; then
{
APP_VERSION=$X_APP_VERSION
Expand Down

0 comments on commit f5b609e

Please sign in to comment.