Commit f63fc1d6 authored by shangbj's avatar shangbj

update

parents f31ba8f4 5afa61db
console.log('app11.js11');
console.log('app11.222');
console.log('app11.222');
\ No newline at end of file
......@@ -2,7 +2,7 @@ const fs = require('fs')
const path = require('path')
const chalk = require('chalk')
const logSymbols = require('log-symbols')
const execSync = require('child_process').execSync
const gitPath = path.join(process.cwd(), process.env.HUSKY_GIT_PARAMS);
const mergeMsgPath = path.join(gitPath,'../','MERGE_MSG')
......@@ -12,8 +12,9 @@ function mergeCheck(){
const mergeMsg = fs.readFileSync(mergeMsgPath, 'utf-8');
let curBranch = execSync("git symbolic-ref HEAD | sed -e \'s,.*/\(.*\),\1,\'", {encoding: 'utf-8'})
console.log(curBranch)
console.log(mergeMsg.join(' ').pop())
console.log('curBranch', curBranch)
console.log('mergeBranch' ,mergeMsg.match(/\"(.*?)\"/g))
process.exit(1)
}
function commitMsgCheck(){
......@@ -27,7 +28,6 @@ function commitMsgCheck(){
function conflictCheck() {
console.log(logSymbols.info, chalk.blue('开始冲突检测...'))
const execSync = require('child_process').execSync
// git 对所有冲突的地方都会生成下面这种格式的信息,所以写个检测冲突文件的正则
const isConflictRegular = "^<<<<<<<\\s|^=======$|^>>>>>>>\\s"
......
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