Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/release.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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) => {
Expand Down
Loading