Merge pull request #698 from iflytek/fix/runtime-aliyun-stop-url
Some checks are pending
Security / Dependency Review (push) Waiting to run
Security / CodeQL (java-kotlin) (push) Waiting to run
Security / CodeQL (javascript-typescript) (push) Waiting to run
Security / CodeQL (python) (push) Waiting to run

fix(deploy): correct Aliyun runtime stop URL
This commit is contained in:
XiaoSeS 2026-08-10 16:13:10 +08:00 committed by GitHub
commit 0690e3f256
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 1 deletions

View file

@ -118,9 +118,13 @@ done
if [ "$USE_ALIYUN" = "true" ]; then
SKILLHUB_RAW_BASE="${SKILLHUB_RAW_BASE:-https://imageless.oss-cn-beijing.aliyuncs.com}"
RUNTIME_SCRIPT_URL="$SKILLHUB_RAW_BASE/runtime.sh"
RUNTIME_SOURCE_ARG=" --aliyun"
echo "Using Aliyun OSS for runtime files: $SKILLHUB_RAW_BASE"
else
SKILLHUB_RAW_BASE="${SKILLHUB_RAW_BASE:-https://raw.githubusercontent.com/iflytek/skillhub/$SKILLHUB_REF}"
RUNTIME_SCRIPT_URL="$SKILLHUB_RAW_BASE/scripts/runtime.sh"
RUNTIME_SOURCE_ARG=""
echo "Using GitHub raw for runtime files: $SKILLHUB_RAW_BASE"
fi
COMPOSE_FILE="$SKILLHUB_HOME/compose.release.yml"
@ -396,7 +400,7 @@ Web UI: $PUBLIC_URL
Backend API: http://localhost:8080
Runtime dir: $SKILLHUB_HOME
Stop with:
curl -fsSL $SKILLHUB_RAW_BASE/scripts/runtime.sh | sh -s -- down$HOME_ARG
curl -fsSL $RUNTIME_SCRIPT_URL | sh -s -- down$RUNTIME_SOURCE_ARG$HOME_ARG
EOF
;;
down)

View file

@ -92,6 +92,19 @@ grep -Fq "Generated SKILLHUB_DOWNLOAD_ANON_COOKIE_SECRET" "$stdout_generated" \
if grep -Fq "$generated_secret" "$stdout_generated"; then
fail "runtime must not print the generated secret value"
fi
grep -Fq "curl -fsSL file://$REPO_ROOT/scripts/runtime.sh | sh -s -- down --home $home_generated" "$stdout_generated" \
|| fail "GitHub runtime should print the scripts/runtime.sh stop URL"
home_aliyun="$tmp/aliyun"
stdout_aliyun="$tmp/aliyun.out"
mkdir -p "$home_aliyun"
run_runtime "$home_aliyun" "$bin_dir" "$stdout_aliyun" --aliyun
grep -Fq "curl -fsSL file://$REPO_ROOT/runtime.sh | sh -s -- down --aliyun --home $home_aliyun" "$stdout_aliyun" \
|| fail "Aliyun runtime should preserve the root runtime.sh URL and --aliyun source mode"
if grep -Fq "file://$REPO_ROOT/scripts/runtime.sh" "$stdout_aliyun"; then
fail "Aliyun runtime must not print the GitHub scripts/runtime.sh path"
fi
home_preserved="$tmp/preserved"
stdout_preserved="$tmp/preserved.out"