chore: harden spacetime publish provisioning
Some checks failed
CI / verify (pull_request) Has been cancelled

This commit is contained in:
2026-05-03 03:38:10 +08:00
parent 62afaf620a
commit cc38057c3c
3 changed files with 116 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ usage() {
进入维护模式,校验 spacetime_module.wasm.sha256并在生产实例本机执行 spacetime publish。
默认使用 http://127.0.0.1:3101避免与部署机本机 Git/Web 服务的 3000 端口冲突。
默认使用 /stdb 作为 spacetime CLI root-dir并以 spacetimedb 用户发布,避免 root CLI 身份污染自托管实例。
发布时固定追加 --no-config只使用显式参数避免工作区或用户目录里的 spacetime 配置干扰目标。
失败时保留维护模式。
EOF
}
@@ -141,6 +142,7 @@ PUBLISH_ARGS=(
"${DATABASE}"
--bin-path "${SOURCE_DIR}/spacetime_module.wasm"
--yes
--no-config
)
if [[ -n "${SERVER_URL}" ]]; then
@@ -173,6 +175,7 @@ if [[ -n "${RUN_AS_USER}" && "$(id -u)" -eq 0 ]]; then
"${DATABASE}"
--bin-path "${PUBLISH_TMP_DIR}/spacetime_module.wasm"
--yes
--no-config
)
if [[ -n "${SERVER_URL}" ]]; then
PUBLISH_ARGS+=(--server "${SERVER_URL}")