fix: 源頭就寫對的網址,不靠發佈時改寫(leo 2026-07-21)

leo:「要發佈的正稿,從頭就不要用奇怪的網址,以免改來改去。」
=sanitize 每次改寫是補丁不是解法。改成源頭正確:

- README/README.en:死帳號 uncle6me-web → youlinhsieh(該帳號已 suspend,
  安裝指令指著它半年沒人發現=別人照做必失敗)
- install.sh/update.sh:來源預設改公開 GitHub raw;內部要指私有草稿源
  走 TEMPLATE_SOURCE= 環境變數覆寫,不改檔 → 兩邊不再需要維護兩份網址
- tasks-project-sync.yaml 註解範例帳號改通用佔位符

sanitize 降級為「安全網」:正常情況應無需改寫;若它報告改了東西=
源頭又混進錯網址的信號,回頭修源頭。保留它做發佈前驗證(殘留即中止)——
擋的是「只有外部使用者才會撞到、我們自己永遠測不到」的錯。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-21 11:32:27 +08:00
parent c25babf4bb
commit 3eeded0432
6 changed files with 29 additions and 18 deletions
+7 -3
View File
@@ -26,9 +26,13 @@ t() { if [ "$IS_ZH" = "yes" ]; then printf '%s\n' "$1"; else printf '%s\n' "$2";
# tn = 不換行版(給 prompt 用)
tn() { if [ "$IS_ZH" = "yes" ]; then printf '%s' "$1"; else printf '%s' "$2"; fi; }
REPO_URL="https://git.uncle6.me/Leo/system-dev-template/raw/branch/main/template"
# 來源預設=公開 GitHubleo 2026-07-21:「要發佈的正稿,從頭就不要用奇怪的網址,
# 以免改來改去」)。內部指向私有草稿源時用環境變數覆寫,不改檔:
# TEMPLATE_SOURCE=https://<私有 raw base> bash scripts/install.sh
TEMPLATE_SOURCE="${TEMPLATE_SOURCE:-https://raw.githubusercontent.com/youlinhsieh/system-dev-template/main}"
REPO_URL="$TEMPLATE_SOURCE/template"
# install.sh / update.sh 住在 main/scripts/(不在 template/)。
SCRIPTS_URL="https://git.uncle6.me/Leo/system-dev-template/raw/branch/main/scripts"
SCRIPTS_URL="$TEMPLATE_SOURCE/scripts"
CREATED=()
SKIPPED=()
@@ -115,7 +119,7 @@ if [ -d "system-dev" ] || [ -d ".claude/wiki" ] || [ -f ".claude/VERSION" ]; the
t " 後續的更新、遷移、補新檔,一律由「更新腳本」處理(不要重跑 install):" \
" All updates, migrations, and new-file additions are handled by the UPDATER (don't re-run install):"
echo ""
echo " curl -sSL https://git.uncle6.me/Leo/system-dev-template/raw/branch/main/scripts/update.sh | bash"
echo " curl -sSL https://raw.githubusercontent.com/youlinhsieh/system-dev-template/main/scripts/update.sh | bash"
echo ""
t " (重跑 install 可能建出空白範本、跟你的真資料並存,故在此停止。)" \
" (Re-running install could create empty templates alongside your real data, so it stops here.)"