From 3b1496c4282aa679fab94881ccb06e55bd24b1ec Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Mon, 14 Sep 2026 15:01:46 -0400 Subject: [PATCH] oskiewar release: find the receipt through the common git dir, so a worktree can release `.git` is a file in a worktree, and `mkdir .git/` for the parity receipt died with EEXIST before the release had deployed anything. The receipt stays shared across checkouts by living in the common dir. Claude-Session: https://claude.ai/code/session_01QohRAHSmeUzgFUSyYrMV28 --- xbox/tools/oskiewar-release.mjs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xbox/tools/oskiewar-release.mjs b/xbox/tools/oskiewar-release.mjs index dfe64dd8eb..05ec656fd1 100644 --- a/xbox/tools/oskiewar-release.mjs +++ b/xbox/tools/oskiewar-release.mjs @@ -11,7 +11,17 @@ import { fileURLToPath } from "node:url"; const root = resolve(dirname(fileURLToPath(import.meta.url)), "../.."); const sourcePath = resolve(root, "xbox/live/oskiewar.js"); -const receiptPath = resolve(root, ".git/oskiewar-parity.json"); +// The receipt lives beside the repository's shared git state. Asked for by +// name rather than assumed at `.git/`: in a worktree that path is a file +// pointing at the common dir, and a release run from one used to die on +// `mkdir .git` before it had deployed anything. +const gitCommonDir = (() => { + const probe = spawnSync("git", ["rev-parse", "--git-common-dir"], + { cwd: root, encoding: "utf8" }); + const dir = (probe.stdout || "").trim(); + return dir ? resolve(root, dir) : resolve(root, ".git"); +})(); +const receiptPath = resolve(gitCommonDir, "oskiewar-parity.json"); const channels = ["web", "ios", "xbox"]; export const sha256 = (value) => createHash("sha256").update(value).digest("hex"); -- 2.51.2