@@ -13,8 +13,9 @@ const argv = require('yargs')
13
13
. alias ( 't' , 'test' )
14
14
. alias ( 'l' , 'last' )
15
15
. alias ( 'g' , 'groupBy' )
16
- . alias ( 'bu' , 'bump' )
17
- . alias ( 'b' , 'branch' )
16
+ . alias ( 'bu' , 'bump' )
17
+ . alias ( 'b' , 'branch' )
18
+ . alias ( 're' , 'rePrepare' )
18
19
. argv
19
20
20
21
const { prettyPrint, write } = require ( './src/commit-prettier/commit-prettier' ) ;
@@ -44,7 +45,7 @@ if (argv.checkCommit) {
44
45
}
45
46
46
47
}
47
- if ( argv . bump ) {
48
+ if ( argv . bump ) {
48
49
console . log ( argv . bump ) ;
49
50
}
50
51
if ( argv . prettyPrint ) {
@@ -55,7 +56,7 @@ if (argv.prettyPrint) {
55
56
56
57
const tags = shortCut . getTagsOrderedByDate ( ) . split ( '\n' ) . reverse ( ) ;
57
58
58
- const numOftag = parseInt ( argv . tag ) ;
59
+ const numOftag = parseInt ( argv . tag ) ;
59
60
60
61
const getFromTag = ( tagNumber ) => tags [ + tagNumber ] ;
61
62
@@ -84,12 +85,16 @@ if (argv.messageComposer) {
84
85
}
85
86
}
86
87
87
- if ( argv . force ) {
88
- const branch = argv . branch || 'develop' ;
89
- shortCut . ex ( `git add . && git commit --amend --no-edit && git fetch && git pull origin ${ branch } --rebase && git push origin HEAD --force` ) ;
88
+ if ( argv . force ) {
89
+ const branch = argv . branch || 'develop' ;
90
+ shortCut . ex ( 'git add .' , true )
91
+ shortCut . ex ( 'git commit --amend --no-edit' , true ) ;
92
+ shortCut . ex ( 'git fetch ' , true ) ;
93
+ shortCut . ex ( `git pull origin ${ branch } --rebase` , true ) ;
94
+ shortCut . ex ( 'git push origin HEAD --force' , true ) ;
90
95
}
91
96
92
- if ( argv . cane ) {
93
- shortCut . ex ( 'git add .' )
94
- shortCut . ex ( 'git commit --amend --no-edit' )
95
- }
97
+ if ( argv . cane ) {
98
+ shortCut . ex ( 'git add .' , true )
99
+ shortCut . ex ( 'git commit --amend --no-edit' , true )
100
+ }
0 commit comments