Skip to content

Commit 847463e

Browse files
authored
Update CLI args (#58)
1 parent 46b7fa5 commit 847463e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/commands/build/distribution/install.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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}"

lib/commands/reaper/reaper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Commands
77
class Reaper < EmergeCLI::Commands::GlobalOptions
88
desc 'Analyze dead code from an Emerge upload'
99

10-
option :upload_id, type: :string, required: true, desc: 'Upload ID to analyze'
10+
option :id, type: :string, required: true, desc: 'Emerge build ID to analyze'
1111
option :project_root, type: :string, required: true,
1212
desc: 'Root directory of the project, defaults to current directory'
1313

@@ -38,7 +38,7 @@ def call(**options)
3838
project_root = @options[:project_root] || Dir.pwd
3939

4040
Sync do
41-
all_data = @profiler.measure('fetch_dead_code') { fetch_all_dead_code(@options[:upload_id]) }
41+
all_data = @profiler.measure('fetch_dead_code') { fetch_all_dead_code(@options[:id]) }
4242
result = @profiler.measure('parse_dead_code') { DeadCodeResult.new(all_data) }
4343

4444
Logger.info result.to_s

0 commit comments

Comments
 (0)