diff --git a/cmd/arcrun-app/.version-source.json b/cmd/arcrun-app/.version-source.json index 384b84a..eb98c44 100644 --- a/cmd/arcrun-app/.version-source.json +++ b/cmd/arcrun-app/.version-source.json @@ -1,6 +1,4 @@ { - "_algo": 2, - "v0.18.17": "cb6e53a052b87482", - "v0.18.18": "a495451d9d9da78a", - "v0.18.19": "b754d7ff97396794" + "_algo": 3, + "v0.18.20": "56af7481fbf47e9b" } diff --git a/cmd/arcrun-app/daemon-version.py b/cmd/arcrun-app/daemon-version.py index c13e84e..156c8bd 100755 --- a/cmd/arcrun-app/daemon-version.py +++ b/cmd/arcrun-app/daemon-version.py @@ -50,7 +50,7 @@ UNRELEASED = "## 下一版(未發佈)" # 版本 → 當時原始碼指紋。用來擋「同一個版號、不同的執行檔」。 SOURCE_LOCK = HERE / ".version-source.json" # 指紋演算法版本:改算法時 +1,帳本會自動作廢重記(見 check_or_record)。 -FINGERPRINT_ALGO = 2 +FINGERPRINT_ALGO = 3 RELEASED_RE = re.compile(r"^## v(\d+)\.(\d+)\.(\d+)(", re.M) @@ -79,8 +79,17 @@ def source_fingerprint(): cwd=ROOT, text=True).split("\n") except subprocess.CalledProcessError: return "" # 不在 git 裡就不擋(例如從 tarball 解出來 build) + # 🔴 2026-08-06 三修:**帳本自己不能算進指紋**(經典的自我參照)。 + # `.version-source.json` 就住在 collector/ 底下 ⇒ 戳版號寫入它,指紋就變 + # ⇒ 同一輪連續打 win/mac/msix,第二支就被自己的閘擋下(實撞)。 + # (查證過:gen-icons.py 產的 .ico 是**位元一致**的,不是它造成的; + # dist/ 也早就 gitignore,不在名單裡。真兇只有帳本。) + # 只排除帳本一個檔——**不要順手把 build/ 整個排掉**, + # 那會讓「換 app icon」不算原始碼變更,等於把閘挖個洞。 + skip = {str(SOURCE_LOCK.relative_to(ROOT))} + h = hashlib.sha256() - for rel in sorted(f for f in files if f.strip()): + for rel in sorted(f for f in files if f.strip() and f not in skip): fp = ROOT / rel if not fp.is_file(): continue # 已刪除的檔案