From 9546fe98b97acf74ed8d0480db9656fb62327282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Mon, 24 Aug 2026 23:24:39 -0400 Subject: [PATCH] Update: refuse pre-channel downgrades; doc docker restore scope Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp --- bin/omarchy-cn-update | 8 ++++++++ manual/zh-cn/02-mirrors.md | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-cn-update b/bin/omarchy-cn-update index 3bf76838..0c5762f5 100755 --- a/bin/omarchy-cn-update +++ b/bin/omarchy-cn-update @@ -52,6 +52,14 @@ stable) ;; esac +# Never move onto a tree that predates the channel mechanism: its update +# command cannot switch back, stranding the install +if [[ ! -f $src/bin/omarchy-cn-channel ]]; then + git -C "$src" checkout -q "$old" + echo "$channel 通道的目标发布早于通道机制,已回退;请使用 nightly 或更新的发布" >&2 + exit 1 +fi + new=$(git -C "$src" rev-parse --short HEAD) echo "Channel: $channel, source: $old -> $new" diff --git a/manual/zh-cn/02-mirrors.md b/manual/zh-cn/02-mirrors.md index 397ba976..f68905a0 100644 --- a/manual/zh-cn/02-mirrors.md +++ b/manual/zh-cn/02-mirrors.md @@ -32,5 +32,6 @@ omarchycn dev-mirror doctor # 连通性检查 ``` 写入前备份到 `~/.local/state/omarchycn/backups/dev-mirror/<时间戳>/`, -恢复:`omarchycn restore list` + `omarchycn restore config <时间戳>`。 -docker 目标写 `/etc/docker/daemon.json`(需 sudo,重启 docker 生效)。 +恢复:`omarchycn restore list` + `omarchycn restore config <时间戳>`(仅用户级文件)。 +docker 目标写 `/etc/docker/daemon.json`(需 sudo,重启 docker 生效;系统文件不参与 +自动恢复,回退用 `omarchycn dev-mirror apply official --target docker`)。