@coveo/semantic-monorepo-tools
Version:
A library of helper functions to do SemVer2 compliant releases from Conventional Commits in monorepos
21 lines (19 loc) • 477 B
text/typescript
import getOptionalFlagArgument from "../utils/getOptionalFlagArgument.js";
import spawn from "../utils/spawn.js";
import gitLogger from "./utils/gitLogger.js";
export default async function (
tree: string,
parent?: string,
message?: string,
) {
return (
await spawn(
"git",
["commit-tree", tree].concat(
getOptionalFlagArgument("-p", parent),
getOptionalFlagArgument("-m", message),
),
gitLogger,
)
).stdout.trim();
}