lerna
Version:
Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository
24 lines (21 loc) • 601 B
JavaScript
import {
exec,
npmlog_default
} from "./chunk-WC2B4V4E.js";
// libs/commands/version/src/lib/git-tag.ts
function gitTag(tag, { forceGitTag, signGitTag }, opts, command = "git tag %s -m %s") {
npmlog_default.silly("gitTag", tag, command);
const [cmd, ...args] = command.split(" ");
const interpolatedArgs = args.map((arg) => arg.replace(/%s/, tag));
if (forceGitTag) {
interpolatedArgs.push("--force");
}
if (signGitTag) {
interpolatedArgs.push("--sign");
}
npmlog_default.verbose(cmd, interpolatedArgs);
return exec(cmd, interpolatedArgs, opts);
}
export {
gitTag
};