@@ -14,8 +14,10 @@ def self.get_bugsnag_cli_path(params)
1414 if bugsnag_cli_version < bundled_bugsnag_cli_version
1515 FastlaneCore ::UI . warning ( "The installed bugsnag-cli at #{ bugsnag_cli_path } is outdated (#{ bugsnag_cli_version } ). The current bundled version is: #{ bundled_bugsnag_cli_version } . It is recommended that you either update your installed version or use the bundled version." )
1616 end
17+ FastlaneCore ::UI . verbose ( "Using bugsnag-cli from path: #{ bugsnag_cli_path } " )
1718 bugsnag_cli_path
1819 else
20+ FastlaneCore ::UI . verbose ( "Using bundled bugsnag-cli from path: #{ bundled_bugsnag_cli_path } " )
1921 bundled_bugsnag_cli_path
2022 end
2123 end
@@ -48,4 +50,55 @@ def self.get_bundled_path
4850 def self . bin_folder ( filename )
4951 File . expand_path ( "../../../../../bin/#{ filename } " , File . dirname ( __FILE__ ) )
5052 end
53+
54+ def self . create_build_args ( api_key , version_name , version_code , bundle_version , release_stage , builder , revision , repository , provider , auto_assign_release , metadata , retries , timeout , endpoint )
55+ args = [ ]
56+ args += [ "--api-key" , api_key ] unless api_key . nil?
57+ args += [ "--version-name" , version_name ] unless version_name . nil?
58+ args += [ "--version-code" , version_code ] unless version_code . nil?
59+ args += [ "--bundle-version" , bundle_version ] unless bundle_version . nil?
60+ args += [ "--release-stage" , release_stage ] unless release_stage . nil?
61+ args += [ "--builder-name" , builder ] unless builder . nil?
62+ args += [ "--revision" , revision ] unless revision . nil?
63+ args += [ "--repository" , repository ] unless repository . nil?
64+ args += [ "--provider" , provider ] unless provider . nil?
65+ args += [ "--auto-assign-release" ] if auto_assign_release
66+ unless metadata . nil?
67+ if metadata . is_a? ( String )
68+ #
69+ args += [ "--metadata" , metadata ]
70+ elsif metadata . is_a? ( Hash )
71+ formatted_metadata = metadata . map { |k , v | %Q{"#{ k } "="#{ v } "} } . join ( "," )
72+ args += [ "--metadata" , formatted_metadata ]
73+ end
74+ end
75+ args += [ "--retries" , retries ] unless retries . nil?
76+ args += [ "--timeout" , timeout ] unless timeout . nil?
77+ args += [ "--build-api-root-url" , endpoint ] unless endpoint . nil?
78+ args += [ "--verbose" ] if FastlaneCore ::UI . verbose?
79+ args
80+ end
81+
82+ def self . upload_args dir , upload_url , project_root , api_key , verbose , ignore_missing_dwarf , ignore_empty_dsym , dryrun , log_level , port , retries , timeout , configuration , scheme , plist , xcode_project
83+ args = [ ]
84+ args += [ "--verbose" ] if verbose
85+ args += [ "--ignore-missing-dwarf" ] if ignore_missing_dwarf
86+ args += [ "--ignore-empty-dsym" ] if ignore_empty_dsym
87+ args += [ "--api-key" , api_key ] unless api_key . nil?
88+ args += [ "--upload-api-root-url" , upload_url ] unless upload_url . nil?
89+ args += [ "--project-root" , project_root ] unless project_root . nil?
90+ args += [ "--dry-run" ] if dryrun
91+ args += [ "--log-level" , log_level ] unless log_level . nil?
92+ args += [ "--port" , port ] unless port . nil?
93+ args += [ "--retries" , retries ] unless retries . nil?
94+ args += [ "--timeout" , timeout ] unless timeout . nil?
95+ args += [ "--configuration" , configuration ] unless configuration . nil?
96+ args += [ "--scheme" , scheme ] unless scheme . nil?
97+ args += [ "--plist" , plist ] unless plist . nil?
98+ args += [ "--xcode-project" , xcode_project ] unless xcode_project . nil?
99+ args << dir
100+ args
101+ end
51102end
103+
104+
0 commit comments