Commit 3badaac4 authored by shangbj's avatar shangbj

1

parent 98b1cdd7
...@@ -10,7 +10,9 @@ const mergeMsgPath = path.join(gitPath,'../','MERGE_MSG') ...@@ -10,7 +10,9 @@ const mergeMsgPath = path.join(gitPath,'../','MERGE_MSG')
function mergeCheck(){ function mergeCheck(){
console.log(logSymbols.info, chalk.blue('开始分支检测...')) console.log(logSymbols.info, chalk.blue('开始分支检测...'))
const mergeMsg = fs.readFileSync(mergeMsgPath, 'utf-8'); const mergeMsg = fs.readFileSync(mergeMsgPath, 'utf-8');
console.log(mergeMsg) const curBranch = execSync(`git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,'`, {encoding: 'utf-8'})
console.log(curBranch)
console.log(mergeMsg.join(' ').pop())
} }
function commitMsgCheck(){ function commitMsgCheck(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment