Total Complexity | 6 |
Complexity/F | 2 |
Lines of Code | 31 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | const { exec } = require('child_process'); |
||
2 | |||
3 | const args = process.argv; |
||
4 | process.argv.splice(0, 2); |
||
5 | const str = args.join(' '); |
||
6 | |||
7 | function cbpush(err) { |
||
8 | if (err) { |
||
9 | console.log(err); |
||
1 ignored issue
–
show
|
|||
10 | return; |
||
11 | } |
||
12 | console.log('done'); |
||
13 | } |
||
14 | |||
15 | function cbcommit(err) { |
||
16 | if (err) { |
||
17 | console.log(err); |
||
1 ignored issue
–
show
|
|||
18 | return; |
||
19 | } |
||
20 | exec('git push', cbpush); |
||
21 | } |
||
22 | |||
23 | function cbadd(err) { |
||
24 | if (err) { |
||
25 | console.log(err); |
||
1 ignored issue
–
show
|
|||
26 | return; |
||
27 | } |
||
28 | exec(`git commit -m "${str}"`, cbcommit); |
||
29 | } |
||
30 | |||
31 | exec('git add .', cbadd); |
||
32 |