From a557994cb93be61a0965116e23fd5336b3e80237 Mon Sep 17 00:00:00 2001 From: leemour Date: Mon, 23 Nov 2026 03:41:08 +0100 Subject: [PATCH] test(release): skip the version-level tests where flock is missing bin/release takes the release lock with flock. macOS and Windows runners do not ship it, so the three tests from #210 failed there with empty output and stopped the 0.33.1 release run 45100386778. Co-Authored-By: Claude Opus 5.5 --- scripts/release.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/release.test.ts b/scripts/release.test.ts index 6ea9ebf..7d983f0 100644 --- a/scripts/release.test.ts +++ b/scripts/release.test.ts @@ -2,7 +2,7 @@ import { execFileSync, spawnSync } from "node:child_process" import { chmodSync, cpSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs" import { tmpdir } from "node:os" import { join } from "node:path" -import { afterEach, expect, it } from "vitest" +import { afterEach, expect, it as vitestIt } from "vitest" const root = join(import.meta.dirname, "..") const devBin = join(root, "node_modules/@wirecat/cli-base/dist/dev/bin.js") @@ -11,6 +11,9 @@ afterEach(() => { for (const dir of dirs.splice(0)) rmSync(dir, { recursive: true, force: true }) }) +// bin/release takes the release lock with flock, which macOS and Windows do not ship. +const it = vitestIt.skipIf(spawnSync("sh", ["-c", "command -v flock"]).status !== 0) + const git = (cwd: string, ...args: string[]) => execFileSync("git", args, { cwd, encoding: "utf8" }) const stub = (dir: string, name: string, body: string) => {