Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setup-php-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ done

case "$MIRROR" in
china)
APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz"
APP_DOWNLOAD_URL="https://storage.swoole.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz"
COMPOSER_DOWNLOAD_URL="https://mirrors.tencent.com/composer/composer.phar"
if [ $OS = 'windows' ]; then
APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip"
APP_DOWNLOAD_URL="https://storage.swoole.com/dist/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip"
fi
;;

Expand Down
10 changes: 7 additions & 3 deletions setup-swoole-cli-runtime.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ try

if ($mirror -eq 'china')
{
$APP_DOWNLOAD_URL = "https://wenda-1252906962.file.myqcloud.com/dist/$APP_NAME-$APP_VERSION-cygwin-x64.zip"
$APP_DOWNLOAD_URL = "https://storage.swoole.com/dist/$APP_NAME-$APP_VERSION-cygwin-x64.zip"
}
if ($proxy -ne '')
{
Expand All @@ -47,13 +47,17 @@ try
{
if (Get-Command "curl.exe" -ErrorAction SilentlyContinue)
{
curl.exe -fSLo "$TMP_APP_RUNTIME\$FILE" $APP_DOWNLOAD_URL
curl.exe -H 'Referer: https://www.swoole.com/download' -H 'User-Agent: download swoole-cli runtime with setup-swoole-cli-runtime.ps1' -fSLo "$TMP_APP_RUNTIME\$FILE" $APP_DOWNLOAD_URL
}
else
{
$headers = @{
'User-Agent' = 'download swoole-cli runtime with setup-swoole-cli-runtime.ps1'
'Referer' = 'https://www.swoole.com/download'
}
# Invoke-WebRequest $APP_DOWNLOAD_URL -UseBasicParsing -OutFile $FILE
# Invoke-WebRequest -Uri $APP_DOWNLOAD_URL -OutFile $FILE
irm $APP_DOWNLOAD_URL -outfile "$TMP_APP_RUNTIME\$FILE"
irm $APP_DOWNLOAD_URL -Headers $headers -outfile "$TMP_APP_RUNTIME\$FILE"
}
}

Expand Down
4 changes: 2 additions & 2 deletions setup-swoole-cli-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ fi

case "$MIRROR" in
china)
APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz"
APP_DOWNLOAD_URL="https://storage.swoole.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz"
COMPOSER_DOWNLOAD_URL="https://mirrors.tencent.com/composer/composer.phar"
if [ $OS = 'windows' ]; then
APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip"
APP_DOWNLOAD_URL="https://storage.swoole.com/dist/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip"
fi
;;

Expand Down
Loading