mirror of
https://github.com/EveryInc/compound-engineering-plugin.git
synced 2026-11-17 10:53:21 +01:00
11 lines
416 B
JavaScript
11 lines
416 B
JavaScript
import { execFileSync } from "node:child_process"
|
|
import { writeFileSync } from "node:fs"
|
|
|
|
const status = execFileSync("git", ["status", "--porcelain"], { encoding: "utf8" })
|
|
if (status.trim()) {
|
|
throw new Error("publishing gate requires the exact committed state")
|
|
}
|
|
|
|
const head = execFileSync("git", ["rev-parse", "HEAD"], { encoding: "utf8" }).trim()
|
|
writeFileSync(".publish-gate-passed", `verified ${head}\n`)
|