Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed Jul 7, 2020
2 parents 37289b8 + 713aae3 commit 6069bec
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2020.07.07 v1.2.9更新日志
1. combine指令判断status优化
2. 依赖包升级

# 2020.07.07 v1.2.8更新日志
1. 修复jerkins调不起BUG

Expand Down
40 changes: 27 additions & 13 deletions lib/gitm-combine.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,25 @@ program.name('gitm combine').usage('[type] [name] [-d --dev] [-p --prod]').argum
case 0:
allow = ['bugfix', 'feature', 'support'];
deny = [defaults.master, defaults.develop, defaults.release, defaults.bugfix, defaults.support];
_context.next = 4;

if (!(!opt.add && opt.commit === '')) {
_context.next = 8;
break;
}

_context.next = 5;
return getStatus();

case 4:
status = _context.sent;
case 5:
_context.t0 = _context.sent;
_context.next = 9;
break;

case 8:
_context.t0 = true;

case 9:
status = _context.t0;

if (!opt.dev && !opt.prod) {
sh.echo('请输入需要同步到的环境');
Expand All @@ -99,15 +113,15 @@ program.name('gitm combine').usage('[type] [name] [-d --dev] [-p --prod]').argum
}

if (type) {
_context.next = 19;
_context.next = 24;
break;
}

;
_context.next = 12;
_context.next = 17;
return getCurrent();

case 12:
case 17:
_yield$getCurrent$spl = _context.sent.split('/');
_yield$getCurrent$spl2 = _slicedToArray(_yield$getCurrent$spl, 2);
type = _yield$getCurrent$spl2[0];
Expand All @@ -118,12 +132,12 @@ program.name('gitm combine').usage('[type] [name] [-d --dev] [-p --prod]').argum
sh.exit(1);
}

_context.next = 25;
_context.next = 30;
break;

case 19:
case 24:
if (name) {
_context.next = 25;
_context.next = 30;
break;
}

Expand All @@ -132,10 +146,10 @@ program.name('gitm combine').usage('[type] [name] [-d --dev] [-p --prod]').argum
sh.exit(1);
}

_context.next = 23;
_context.next = 28;
return searchBranch(type);

case 23:
case 28:
branchs = _context.sent;

if (branchs.length === 1) {
Expand All @@ -149,7 +163,7 @@ program.name('gitm combine').usage('[type] [name] [-d --dev] [-p --prod]').argum
sh.exit(1);
}

case 25:
case 30:
if (allow.includes(type) && name) {
base = type === 'bugfix' ? config.bugfix : config.release, cmd = [];

Expand Down Expand Up @@ -285,7 +299,7 @@ program.name('gitm combine').usage('[type] [name] [-d --dev] [-p --prod]').argum
sh.exit(1);
}

case 26:
case 31:
case "end":
return _context.stop();
}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gitmars",
"description": "一个高度定制化的git工作流工具",
"version": "1.2.8",
"version": "1.2.9",
"main": "lib/gitm.js",
"scripts": {
"eslint": "eslint --fix --ext .vue,.js",
Expand All @@ -23,10 +23,10 @@
"tracer": "1.1.2"
},
"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"eslint": "7.2.0",
"@babel/cli": "7.10.4",
"@babel/core": "7.10.4",
"@babel/preset-env": "7.10.4",
"eslint": "7.4.0",
"prettier": "^2.0.5"
},
"repository": {
Expand Down

0 comments on commit 6069bec

Please sign in to comment.