chore: fix script to not break on windows (#581)

fix script to not break on windows
This commit is contained in:
Krishan
2026-05-24 21:11:58 +10:00
committed by GitHub
parent 36887eaf40
commit a823e45535
+9 -7
View File
@@ -46,17 +46,19 @@ console.log("Updating cinny web submodule");
execSync("git submodule update --init --recursive", { stdio: "inherit" }); 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( const latestCommit = execSync("git rev-list --tags --max-count=1", {
"cd cinny && git describe --tags $(git rev-list --tags --max-count=1)" cwd: "cinny",
) }).toString().trim();
.toString()
.trim(); const latestTag = execSync(`git describe --tags ${latestCommit}`, {
cwd: "cinny",
}).toString().trim();
console.log(`Latest cinny tag: ${latestTag}`); 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" }); execSync("git add cinny", { stdio: "inherit" });