This commit is contained in:
rkiel
2019-07-18 16:09:29 -04:00
parent 308d62fc86
commit 2443a88ad7
4 changed files with 48 additions and 42 deletions

View File

@@ -1,6 +1,7 @@
const _ = require("lodash");
const path = x => require("../" + x);
const commander = path("js/commander");
const immutable = path("js/immutable");
const shell = path("js/shell");
@@ -12,8 +13,18 @@ function setCurrentBranch(dp) {
return shell.capture(cmd).then(x => immutable.set(dp, "branch.current", x));
}
function setFeatureBranch(dp) {
const fb = [
commander.prefix(),
dp.branch.current,
commander.featureName()
].join("-");
return immutable.set(dp, "branch.feature", fb);
}
lib = {
setCurrentBranch
setCurrentBranch,
setFeatureBranch
};
module.exports = lib;