diff --git a/sapi/scripts/generate-artifact-hash.sh b/sapi/scripts/generate-artifact-hash.sh index f95f089bc7..53d291e5ec 100644 --- a/sapi/scripts/generate-artifact-hash.sh +++ b/sapi/scripts/generate-artifact-hash.sh @@ -142,7 +142,7 @@ WINDOWS_DOWNLOAD_SWOOLE_CLIE_RUNTIME() { 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/${X_VERSION}/all-deps.zip } WINDOWS_DOWNLOAD() { @@ -168,6 +168,11 @@ DOWNLOAD() { } DOWNLOAD +======= +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/${VERSION}/all-deps.zip +>>>>>>> experiment-feature-new ls -p | grep -v '/$' | xargs sha256sum diff --git a/setup-swoole-cli-runtime.sh b/setup-swoole-cli-runtime.sh index 8c3e378e27..6c06390472 100644 --- a/setup-swoole-cli-runtime.sh +++ b/setup-swoole-cli-runtime.sh @@ -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=''