@@ -14,7 +14,7 @@ class Install < EmergeCLI::Commands::GlobalOptions
1414
1515 option :api_token , type : :string , required : false ,
1616 desc : 'API token for authentication, defaults to ENV[EMERGE_API_TOKEN]'
17- option :build_id , type : :string , required : true , desc : 'Build ID to download'
17+ option :id , type : :string , required : true , desc : 'Emerge build ID to download'
1818 option :install , type : :boolean , default : true , required : false , desc : 'Install the build on the device'
1919 option :device_id , type : :string , desc : 'Specific device ID to target'
2020 option :device_type , type : :string , enum : %w[ virtual physical any ] , default : 'any' ,
@@ -33,7 +33,7 @@ def call(**options)
3333 api_token = @options [ :api_token ] || ENV . fetch ( 'EMERGE_API_TOKEN' , nil )
3434 raise 'API token is required' unless api_token
3535
36- raise 'Build ID is required' unless @options [ :build_id ]
36+ raise 'Build ID is required' unless @options [ :id ]
3737
3838 output_name = nil
3939 app_id = nil
@@ -42,15 +42,15 @@ def call(**options)
4242 @network ||= EmergeCLI ::Network . new ( api_token :)
4343
4444 Logger . info 'Getting build URL...'
45- request = get_build_url ( @options [ :build_id ] )
45+ request = get_build_url ( @options [ :id ] )
4646 response = parse_response ( request )
4747
4848 platform = response [ 'platform' ]
4949 download_url = response [ 'downloadUrl' ]
5050 app_id = response [ 'appId' ]
5151
5252 extension = platform == 'ios' ? 'ipa' : 'apk'
53- output_name = @options [ :output ] || "#{ @options [ :build_id ] } .#{ extension } "
53+ output_name = @options [ :output ] || "#{ @options [ :id ] } .#{ extension } "
5454
5555 if File . exist? ( output_name )
5656 Logger . info "Build file already exists at #{ output_name } "
0 commit comments