fastlane/lib/fastlane/actions/appaloosa.rb in fastlane_hotfix-2.165.1 vs fastlane/lib/fastlane/actions/appaloosa.rb in fastlane_hotfix-2.187.0

- old
+ new

@@ -8,11 +8,11 @@ binary = params[:binary] remove_extra_screenshots_file(params[:screenshots]) binary_url = get_binary_link(binary, api_key, store_id, params[:group_ids]) return if binary_url.nil? screenshots_url = get_screenshots_links(api_key, store_id, params[:screenshots], params[:locale], params[:device]) - upload_on_appaloosa(api_key, store_id, binary_url, screenshots_url, params[:group_ids], params[:description]) + upload_on_appaloosa(api_key, store_id, binary_url, screenshots_url, params[:group_ids], params[:description], params[:changelog]) end def self.get_binary_link(binary, api_key, store_id, group_ids) key_s3 = upload_on_s3(binary, api_key, store_id, group_ids) return if key_s3.nil? @@ -99,20 +99,21 @@ next if screen.match(device).nil? "#{path}/#{locale}#{screen}" unless Dir.exist?("#{path}/#{locale}#{screen}") end.compact end - def self.upload_on_appaloosa(api_key, store_id, binary_path, screenshots, group_ids, description) + 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], @@ -216,9 +217,13 @@ description: 'Select the device format for your screenshots', optional: true), FastlaneCore::ConfigItem.new(key: :description, env_name: 'FL_APPALOOSA_DESCRIPTION', description: 'Your app description', + optional: true), + FastlaneCore::ConfigItem.new(key: :changelog, + env_name: 'FL_APPALOOSA_CHANGELOG', + description: 'Your app changelog', optional: true) ] end def self.authors