File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ cli.command('list', 'List changesets')
3434 . option ( '--minor-versions' , 'Output only the available Unity minor versions' )
3535 . option ( '--latest-patch' , 'Output only the latest Unity patch versions' )
3636 . option ( '--oldest-patch' , 'Output only the oldest Unity patch versions' )
37+ . option ( '--latest-lifecycle' , 'Output only the latest lifecycle Unity patch versions' )
3738 . action ( options => ( async ( ) => {
3839 var results = options . all
3940 ? ( await scrapeArchivedChangesets ( ) ) . concat ( await scrapeBetaChangesets ( options . latestPatch ) )
@@ -53,6 +54,12 @@ cli.command('list', 'List changesets')
5354 results . forEach ( r => r . version = r . minor )
5455 results = Object . values ( groupBy ( results , r => r . version ) ) . map ( g => g [ 0 ] ) ;
5556 }
57+ // Group by minor version and get latest lifecycle patch
58+ else if ( options . latestLifecycle ) {
59+ results = Object . values ( groupBy ( results , r => r . minor ) )
60+ . map ( g => g . filter ( v => v . lifecycle == g [ 0 ] . lifecycle ) ) ;
61+ results = [ ] . concat ( ...results ) ;
62+ }
5663 // Group by minor version and get latest patch
5764 else if ( options . latestPatch ) {
5865 results = Object . values ( groupBy ( results , r => r . minor ) ) . map ( g => g [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments