File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { confirm } from "#core/utils" ;
21import Command from "#lib/command" ;
32import DebRepository from "#lib/deb-repository" ;
43
@@ -50,17 +49,13 @@ export default class extends Command {
5049 const root = this . _findGitPackage ( ) ?. root ;
5150 if ( ! root ) return result ( [ 500 , "Unable to find root package" ] ) ;
5251
53- if ( ! process . cli . arguments . package && ! process . cli . options . yes ) {
54- if ( ( await confirm ( "Build all packages?" ) ) !== "yes" ) return result ( [ 400 , "Cancelled" ] ) ;
55- }
56-
5752 const debRepository = new DebRepository ( root ) ;
5853
5954 const res = await debRepository . checkRepository ( ) ;
6055 if ( ! res . ok ) return res ;
6156
6257 return debRepository . buildPackages ( {
63- "packages " : process . cli . arguments . package ,
58+ "patterns " : process . cli . arguments . pattern ,
6459 "codenames" : process . cli . options . codename ,
6560 "versions" : process . cli . options [ "build-version" ] ,
6661 } ) ;
Original file line number Diff line number Diff line change @@ -106,19 +106,12 @@ export default class DebRepository {
106106 return result ( 200 ) ;
107107 }
108108
109- async buildPackages ( { packages, codenames, versions } = { } ) {
110- if ( ! packages ) {
111- packages = await glob ( "*" , {
112- "cwd" : this . root + "/packages" ,
113- } ) ;
114-
115- versions = [ null ] ;
116- }
117- else {
118- if ( ! Array . isArray ( packages ) ) packages = [ packages ] ;
109+ async buildPackages ( { patterns, codenames, versions } = { } ) {
110+ const packages = await glob ( patterns , {
111+ "cwd" : this . root + "/packages" ,
112+ } ) ;
119113
120- versions ||= [ null ] ;
121- }
114+ versions ||= [ null ] ;
122115
123116 const res = this . #getCodenames( codenames ) ;
124117 if ( ! res . ok ) return res ;
You can’t perform that action at this time.
0 commit comments