Class: Fastlane::Actions::ApteligentAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, author, deprecated_notes, details, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text
Class Method Details
.authors ⇒ Object
83
84
85
|
# File 'fastlane/lib/fastlane/actions/apteligent.rb', line 83
def self.authors
["Mo7amedFouad"]
end
|
.available_options ⇒ Object
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'fastlane/lib/fastlane/actions/apteligent.rb', line 65
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",
sensitive: true,
description: "Apteligent App API key e.g. IXPQIi8yCbHaLliqzRoo065tH0lxxxxx",
optional: false)
]
end
|
.category ⇒ Object
100
101
102
|
# File 'fastlane/lib/fastlane/actions/apteligent.rb', line 100
def self.category
:beta
end
|
.description ⇒ Object
61
62
63
|
# File 'fastlane/lib/fastlane/actions/apteligent.rb', line 61
def self.description
"Upload dSYM file to [Apteligent (Crittercism)](http://www.apteligent.com/)"
end
|
.dsym_path(params) ⇒ Object
.example_code ⇒ Object
91
92
93
94
95
96
97
98
|
# File 'fastlane/lib/fastlane/actions/apteligent.rb', line 91
def self.example_code
[
'apteligent(
app_id: "...",
api_key: "..."
)'
]
end
|
.fail_on_error(result) ⇒ Object
19
20
21
22
23
24
25
|
# File 'fastlane/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
87
88
89
|
# File 'fastlane/lib/fastlane/actions/apteligent.rb', line 87
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 'fastlane/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.test?
result = Actions.sh(shell_command)
fail_on_error(result)
end
|
.upload_options(params) ⇒ Object
45
46
47
48
49
50
51
52
53
54
55
|
# File 'fastlane/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 'fastlane/lib/fastlane/actions/apteligent.rb', line 27
def self.upload_url(app_id)
"https://api.crittercism.com/api_beta/dsym/#{app_id}"
end
|