Class: Fastlane::Actions::ApteligentAction
Class Method Summary
collapse
action_name, author, details, method_missing, other_action, output, return_value, sh, step_text
Class Method Details
.authors ⇒ Object
80
81
82
|
# File 'lib/fastlane/actions/apteligent.rb', line 80
def self.authors
["Mo7amedFouad"]
end
|
.available_options ⇒ Object
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# File 'lib/fastlane/actions/apteligent.rb', line 63
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :dsym,
env_name: "FL_APTELIGENT_FILE",
description: "dSYM.zip file to upload to Apteligent",
optional: true),
FastlaneCore::ConfigItem.new(key: :app_id,
env_name: "FL_APTELIGENT_APP_ID",
description: "Apteligent App ID key e.g. 569f5c87cb99e10e00c7xxxx",
optional: false),
FastlaneCore::ConfigItem.new(key: :api_key,
env_name: "FL_APTELIGENT_API_KEY",
description: "Apteligent App API key e.g. IXPQIi8yCbHaLliqzRoo065tH0lxxxxx",
optional: false)
]
end
|
.description ⇒ Object
59
60
61
|
# File 'lib/fastlane/actions/apteligent.rb', line 59
def self.description
"Upload dSYM file to Apteligent (Crittercism)"
end
|
.dsym_path(params) ⇒ Object
.fail_on_error(result) ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/fastlane/actions/apteligent.rb', line 19
def self.fail_on_error(result)
if result != "200"
UI.crash! "Server error, failed to upload the dSYM file."
else
UI.success 'dSYM successfully uploaded to Apteligent!'
end
end
|
.is_supported?(platform) ⇒ Boolean
84
85
86
|
# File 'lib/fastlane/actions/apteligent.rb', line 84
def self.is_supported?(platform)
platform == :ios
end
|
.run(params) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/fastlane/actions/apteligent.rb', line 4
def self.run(params)
command = []
command << "curl"
command += upload_options(params)
command << upload_url(params[:app_id].shellescape)
shell_command = command.join(' ')
return shell_command if Helper.is_test?
result = Actions.sh(shell_command)
fail_on_error(result)
end
|
.upload_options(params) ⇒ Object
45
46
47
48
49
50
51
52
53
|
# File 'lib/fastlane/actions/apteligent.rb', line 45
def self.upload_options(params)
file_path = dsym_path(params).shellescape
options = []
options << "--write-out %{http_code} --silent --output /dev/null"
options << "-F dsym=@#{file_path}"
options << "-F key=#{params[:api_key].shellescape}"
options
end
|
.upload_url(app_id) ⇒ Object
27
28
29
|
# File 'lib/fastlane/actions/apteligent.rb', line 27
def self.upload_url(app_id)
"https://api.crittercism.com/api_beta/dsym/#{app_id}"
end
|