@catladder/cli
Version:
Panter cli tool for cloud CI/CD and DevOps
14 lines (13 loc) • 382 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMainBranch = void 0;
const child_process_promise_1 = require("child-process-promise");
const getMainBranch = async () => {
const {
stdout
} = await (0, child_process_promise_1.exec)("git rev-parse --abbrev-ref HEAD");
return stdout.trim();
};
exports.getMainBranch = getMainBranch;