Commit 1d599406 authored by shangbj's avatar shangbj

update

parents 7bc50c00 16bcbf4e
...@@ -8,13 +8,15 @@ const gitPath = path.join(process.cwd(), process.env.HUSKY_GIT_PARAMS); ...@@ -8,13 +8,15 @@ const gitPath = path.join(process.cwd(), process.env.HUSKY_GIT_PARAMS);
const mergeMsgPath = path.join(gitPath,'../','MERGE_MSG') const mergeMsgPath = path.join(gitPath,'../','MERGE_MSG')
function mergeCheck(){ function mergeCheck(){
console.log(logSymbols.info, chalk.blue('开始分支检测...'))
const mergeMsg = fs.readFileSync(mergeMsgPath, 'utf-8'); const mergeMsg = fs.readFileSync(mergeMsgPath, 'utf-8');
let curBranch = execSync("git symbolic-ref HEAD | sed -e \'s,.*/\(.*\),\1,\'", {encoding: 'utf-8'}) if(mergeMsg){
console.log(logSymbols.info, chalk.blue('开始分支检测...'))
let curBranch = execSync("git symbolic-ref HEAD | sed -e \'s,.*/\(.*\),\1,\'", {encoding: 'utf-8'})
console.log('curBranch', curBranch) console.log('curBranch', curBranch)
console.log('mergeBranch' ,mergeMsg.match(/\"(.*?)\"/g)) console.log('mergeBranch' ,mergeMsg)
// process.exit(1) // process.exit(1)
}
} }
function commitMsgCheck(){ function commitMsgCheck(){
......
11 console.log(1)
\ No newline at end of file \ No newline at end of file
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