From 8de293b38fc9c97e7f53e57fa2239b2caa1ec261 Mon Sep 17 00:00:00 2001 From: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com> Date: Fri, 7 Aug 2026 16:45:12 +0800 Subject: [PATCH 1/2] fix(deploy): correct Aliyun runtime stop URL Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com> --- scripts/runtime.sh | 4 +++- scripts/tests/runtime-secret-test.sh | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/runtime.sh b/scripts/runtime.sh index fec6375e..eab3e4f4 100755 --- a/scripts/runtime.sh +++ b/scripts/runtime.sh @@ -118,9 +118,11 @@ 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" 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" echo "Using GitHub raw for runtime files: $SKILLHUB_RAW_BASE" fi COMPOSE_FILE="$SKILLHUB_HOME/compose.release.yml" @@ -396,7 +398,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$HOME_ARG EOF ;; down) diff --git a/scripts/tests/runtime-secret-test.sh b/scripts/tests/runtime-secret-test.sh index 506b58fd..4dd10e4e 100755 --- a/scripts/tests/runtime-secret-test.sh +++ b/scripts/tests/runtime-secret-test.sh @@ -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 --home $home_aliyun" "$stdout_aliyun" \ + || fail "Aliyun runtime should print the root runtime.sh stop URL" +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" From 4efeed18c833b9b88c723e3474f212b48269f4eb Mon Sep 17 00:00:00 2001 From: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com> Date: Fri, 7 Aug 2026 18:20:06 +0800 Subject: [PATCH 2/2] fix(deploy): preserve Aliyun source mode in stop command Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com> --- scripts/runtime.sh | 4 +++- scripts/tests/runtime-secret-test.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/runtime.sh b/scripts/runtime.sh index eab3e4f4..7299b54d 100755 --- a/scripts/runtime.sh +++ b/scripts/runtime.sh @@ -119,10 +119,12 @@ 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" @@ -398,7 +400,7 @@ Web UI: $PUBLIC_URL Backend API: http://localhost:8080 Runtime dir: $SKILLHUB_HOME Stop with: - curl -fsSL $RUNTIME_SCRIPT_URL | sh -s -- down$HOME_ARG + curl -fsSL $RUNTIME_SCRIPT_URL | sh -s -- down$RUNTIME_SOURCE_ARG$HOME_ARG EOF ;; down) diff --git a/scripts/tests/runtime-secret-test.sh b/scripts/tests/runtime-secret-test.sh index 4dd10e4e..71f7f7cd 100755 --- a/scripts/tests/runtime-secret-test.sh +++ b/scripts/tests/runtime-secret-test.sh @@ -100,8 +100,8 @@ 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 --home $home_aliyun" "$stdout_aliyun" \ - || fail "Aliyun runtime should print the root runtime.sh stop URL" +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