104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
# File 'fastlane/lib/fastlane/actions/appaloosa.rb', line 104
def self.upload_on_appaloosa(api_key, store_id, binary_path, screenshots, group_ids, description, changelog)
screenshots = all_screenshots_links(screenshots)
uri = URI("#{APPALOOSA_SERVER}/#{store_id}/mobile_application_updates/upload")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri.path, { 'Content-Type' => 'application/json' })
req.body = { store_id: store_id,
api_key: api_key,
mobile_application_update: {
description: description,
changelog: changelog,
binary_path: binary_path,
screenshot1: screenshots[0],
screenshot2: screenshots[1],
screenshot3: screenshots[2],
screenshot4: screenshots[3],
screenshot5: screenshots[4],
group_ids: group_ids,
provider: 'fastlane'
} }.to_json
uoa_response = http.request(req)
json_res = JSON.parse(uoa_response.body)
if json_res['errors']
UI.error("App: #{json_res['errors']}")
else
UI.success("Binary processing: Check your app': #{json_res['link']}")
end
end
|