Skip to content

Commit

Permalink
fix bug (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk authored Dec 16, 2024
1 parent b8cfa40 commit 25c6b09
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sapi/scripts/generate-artifact-hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ APP_DOWNLOAD_URL="https://github.com/swoole/swoole-cli/releases/download/${VERSI

APP_RUNTIME="${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}"
test -f ${APP_RUNTIME}.zip || curl -LSo ${APP_RUNTIME}.zip ${APP_DOWNLOAD_URL}
test -f all-deps.zip || curl -LSo all-deps.zip https://github.com/swoole/swoole-cli/releases/download/v5.1.5.1/all-deps.zip
test -f all-deps.zip || curl -LSo all-deps.zip https://github.com/swoole/swoole-cli/releases/download/${VERSION}/all-deps.zip

ls -p | grep -v '/$' | xargs sha256sum

Expand Down
10 changes: 8 additions & 2 deletions setup-swoole-cli-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,14 @@ while [ $# -gt 0 ]; do
X_VERSION=$(echo "$2" | grep -E '^v\d\.\d{1,2}\.\d{1,2}\.\d{1,2}$')
X_APP_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}')
elif [ $OS = "linux" ]; then
X_VERSION=$(echo "$2" | grep -P '^v\d\.\d{1,2}\.\d{1,2}\.\d{1,2}$')
X_APP_VERSION=$(echo "$2" | grep -Po '^v\d\.\d{1,2}\.\d{1,2}')
OS_RELEASE=$(awk -F= '/^ID=/{print $2}' /etc/os-release | tr -d '\n' | tr -d '\"')
if [ "$OS_RELEASE" = 'alpine' ]; then
X_VERSION=$(echo "$2" | grep -E '^v\d\.\d{1,2}\.\d{1,2}\.\d{1,2}$')
X_APP_VERSION=$(echo "$2" | grep -Eo '^v\d\.\d{1,2}\.\d{1,2}')
else
X_VERSION=$(echo "$2" | grep -P '^v\d\.\d{1,2}\.\d{1,2}\.\d{1,2}$')
X_APP_VERSION=$(echo "$2" | grep -Po '^v\d\.\d{1,2}\.\d{1,2}')
fi
else
X_VERSION=''
X_APP_VERSION=''
Expand Down

0 comments on commit 25c6b09

Please sign in to comment.