File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ cli.command('<version>', 'Get a changeset for specific version')
2828cli . command ( 'list' , 'List changesets' )
2929 . option ( '--min <version>' , 'Minimum version (included)' )
3030 . option ( '--max <version>' , 'Maximum version (included)' )
31+ . option ( '--grep <version>' , 'Grep version' )
3132 . option ( '--json' , 'Output in json format' )
3233 . option ( '--all' , 'List all changesets (alpha/beta included)' )
3334 . option ( '--beta' , 'List alpha/beta changesets' )
@@ -42,10 +43,9 @@ cli.command('list', 'List changesets')
4243 // Filter by min/max.
4344 var min = options . min ? toNumber ( options . min ) : Number . MIN_VALUE ;
4445 var max = options . max ? toNumber ( options . max ) : Number . MAX_VALUE ;
45- results = results . filter ( r => {
46- const n = toNumber ( r . version ) ;
47- return min <= n && n <= max ;
48- } ) ;
46+ results = results
47+ . filter ( r => r . version . includes ( options . grep || '' ) )
48+ . filter ( r => min <= toNumber ( r . version ) && toNumber ( r . version ) <= max ) ;
4949
5050 if ( options . json ) {
5151 if ( options . versions )
6969 . example ( 'unity-changeset list --beta' )
7070 . example ( 'unity-changeset list --versions' )
7171 . help ( )
72- . version ( '1.1 .0' ) ;
72+ . version ( '1.2 .0' ) ;
7373
7474if ( process . argv . length < 3 ) {
7575 cli . outputHelp ( true ) ;
You can’t perform that action at this time.
0 commit comments