Merge branch 'master' into jeandr/add-support-for-aab-stores-upload

This commit is contained in:
Jean-Philippe ANDRE 2019-07-11 14:38:59 +09:00
Родитель 4c55f10e02 afdc16edd1
Коммит 99e5e5c7fe
3 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -48,6 +48,7 @@ The action parameters `api_token` and `owner_name` can also be omitted when thei
- `APPCENTER_DISTRIBUTE_RELEASE_NOTES` - Release notes
- `APPCENTER_DISTRIBUTE_RELEASE_NOTES_CLIPPING` - Clip release notes if its length is more then 5000, `true` by default
- `APPCENTER_DISTRIBUTE_RELEASE_NOTES_LINK` - Additional release notes link
- `APPCENTER_DISTRIBUTE_TIMEOUT` - Sets the request timeout in seconds. Used when uploading builds to App Center.
## Example

Просмотреть файл

@ -102,6 +102,7 @@ module Fastlane
release_notes = params[:release_notes]
should_clip = params[:should_clip]
release_notes_link = params[:release_notes_link]
timeout = params[:timeout]
if release_notes.length >= Constants::MAX_RELEASE_NOTES_LENGTH
unless should_clip
@ -130,7 +131,7 @@ module Fastlane
upload_url = upload_details['upload_url']
UI.message("Uploading release binary...")
uploaded = Helper::AppcenterHelper.upload_build(api_token, owner_name, app_name, file, upload_id, upload_url)
uploaded = Helper::AppcenterHelper.upload_build(api_token, owner_name, app_name, file, upload_id, upload_url, timeout)
if uploaded
release_id = uploaded['release_id']
@ -428,6 +429,12 @@ module Fastlane
description: "The version number. Used (and required) for uploading Android ProGuard mapping file",
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :timeout,
env_name: "APPCENTER_DISTRIBUTE_TIMEOUT",
description: "Request timeout in seconds",
optional: true,
type: Integer),
]
end

Просмотреть файл

@ -125,7 +125,7 @@ module Fastlane
end
end
# committs or aborts symbol upload
# commits or aborts symbol upload
def self.update_symbol_upload(api_token, owner_name, app_name, symbol_upload_id, status)
connection = self.connection
@ -179,7 +179,7 @@ module Fastlane
# upload binary for specified upload_url
# if succeed, then commits the release
# otherwise aborts
def self.upload_build(api_token, owner_name, app_name, file, upload_id, upload_url)
def self.upload_build(api_token, owner_name, app_name, file, upload_id, upload_url, timeout)
connection = self.connection(upload_url)
options = {}
@ -188,6 +188,7 @@ module Fastlane
options[:ipa] = Faraday::UploadIO.new(file, 'application/octet-stream') if file && File.exist?(file)
response = connection.post do |req|
req.options.timeout = timeout
req.headers['internal-request-source'] = "fastlane"
req.body = options
end