@@ -6,28 +6,18 @@ import { appcenterArgs } from './appcenterArgs'
66import { buildBundleConfig , getAppVersion , info } from '../bundle/utils'
77import { bundle } from '../bundle/bundle'
88import { execSync } from 'child_process'
9+ import { bundleArgs } from './bundleArgs'
910
1011yargs ( hideBin ( process . argv ) )
11- . command (
12- 'target <app>' ,
13- 'Get the version of the app that will be uploaded to AppCenter.' ,
14- ( yargs ) =>
15- appcenterArgs ( yargs ) . positional ( 'app' , { type : 'string' , demandOption : true , alias : [ 'platform' , 'os' ] } ) ,
16- async ( args ) => {
17- console . log ( args )
18- const bundlerConfig = buildBundleConfig ( args )
19- const version = await getAppVersion ( bundlerConfig )
20-
21- console . log ( version )
22- }
23- )
2412 . command (
2513 'bundle <app>' ,
2614 'Bundle the app for release.' ,
2715 ( yargs ) =>
28- appcenterArgs ( yargs )
29- . positional ( 'app' , { type : 'string' , demandOption : true , alias : [ 'platform' , 'os' ] } )
30- . option ( 'base' , { type : 'string' , demandOption : true } ) ,
16+ bundleArgs ( appcenterArgs ( yargs ) ) . positional ( 'app' , {
17+ type : 'string' ,
18+ demandOption : true ,
19+ alias : [ 'platform' , 'os' ] ,
20+ } ) ,
3121 async ( args ) => {
3222 const result = await bundle ( { ...args } )
3323 console . log ( result )
@@ -36,11 +26,7 @@ yargs(hideBin(process.argv))
3626 . command (
3727 'release-react' ,
3828 'Build and release a React Native app to AppCenter.' ,
39- ( yargs ) =>
40- appcenterArgs ( yargs )
41- . option ( 'app' , { type : 'string' , demandOption : true , alias : [ 'a' ] } )
42- . option ( 'base' , { type : 'string' , demandOption : true } )
43- . option ( 'rest' , { type : 'string' , default : '' } ) ,
29+ ( yargs ) => bundleArgs ( appcenterArgs ( yargs ) ) . option ( 'app' , { type : 'string' , demandOption : true , alias : [ 'a' ] } ) ,
4430 async ( args ) => {
4531 const bundlerConfig = buildBundleConfig ( { ...args } )
4632 const version = args . version ?? ( await getAppVersion ( bundlerConfig ) )
0 commit comments