fix(deploy): deploy/ 自己没跟着上机,改它等于没改
重启跑的是 NAS 上那份 stop.sh / start.sh,而 push.sh 只同步 backend/ 和 client/build/。结果就是:修好 stop.sh 的 pgrep、提交、部署、报成功,远端 照样跑着旧脚本——上一个提交正是这么被架空的。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,14 @@ $TAR --exclude .venv --exclude .env --exclude __pycache__ \
|
|||||||
--exclude '*.db' --exclude tests --exclude .pytest_cache \
|
--exclude '*.db' --exclude tests --exclude .pytest_cache \
|
||||||
-C "$REPO/backend" . | sh_ "tar xzf - -C '$APP/backend'"
|
-C "$REPO/backend" . | sh_ "tar xzf - -C '$APP/backend'"
|
||||||
|
|
||||||
|
# The restart below runs the NAS's own copies of stop.sh / start.sh, so they
|
||||||
|
# have to travel with the code — otherwise a fix to them lands in git, the
|
||||||
|
# deploy reports success, and the far side keeps running the old ones. That is
|
||||||
|
# exactly how the broken pgrep guards survived a deploy that was meant to fix
|
||||||
|
# them.
|
||||||
|
echo "==> deploy scripts"
|
||||||
|
$TAR -C "$REPO/deploy" . | sh_ "tar xzf - -C '$APP/deploy'"
|
||||||
|
|
||||||
echo "==> static (cleared first, so stale JS chunks do not pile up)"
|
echo "==> static (cleared first, so stale JS chunks do not pile up)"
|
||||||
if [ ! -f "$REPO/client/build/index.html" ]; then
|
if [ ! -f "$REPO/client/build/index.html" ]; then
|
||||||
echo "client/build is missing — run 'npm run build' first" >&2
|
echo "client/build is missing — run 'npm run build' first" >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user