From a823e45535bc77b5f9dbf453352f57ea18178df4 Mon Sep 17 00:00:00 2001 From: Krishan <33421343+kfiven@users.noreply.github.com> Date: Sun, 24 May 2026 21:11:58 +1000 Subject: [PATCH] chore: fix script to not break on windows (#581) fix script to not break on windows --- scripts/update-version.mjs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/update-version.mjs b/scripts/update-version.mjs index 6e35ab3..85a4d2b 100644 --- a/scripts/update-version.mjs +++ b/scripts/update-version.mjs @@ -46,17 +46,19 @@ console.log("Updating cinny web submodule"); execSync("git submodule update --init --recursive", { stdio: "inherit" }); -execSync("cd cinny && git fetch --tags", { stdio: "inherit" }); +execSync("git fetch --tags", { cwd: "cinny", stdio: "inherit" }); -const latestTag = execSync( - "cd cinny && git describe --tags $(git rev-list --tags --max-count=1)" -) - .toString() - .trim(); +const latestCommit = execSync("git rev-list --tags --max-count=1", { + cwd: "cinny", +}).toString().trim(); + +const latestTag = execSync(`git describe --tags ${latestCommit}`, { + cwd: "cinny", +}).toString().trim(); console.log(`Latest cinny tag: ${latestTag}`); -execSync(`cd cinny && git checkout ${latestTag}`, { stdio: "inherit" }); +execSync(`git checkout ${latestTag}`, { cwd: "cinny", stdio: "inherit" }); execSync("git add cinny", { stdio: "inherit" });