fix: iOS fastfile behavior

This commit is contained in:
Rainer Killinger
2022-03-15 13:27:39 +01:00
parent 58ce196507
commit 368c26ce8c

View File

@@ -14,6 +14,7 @@
# update_fastlane # update_fastlane
require 'json' require 'json'
require 'base64'
default_platform(:ios) default_platform(:ios)
@@ -23,9 +24,7 @@ package_json = JSON.parse(File.read('../../../package.json'))
api_key = app_store_connect_api_key( api_key = app_store_connect_api_key(
key_id: ENV['APPLE_API_KEY_ID'], key_id: ENV['APPLE_API_KEY_ID'],
issuer_id: ENV['APPLE_API_KEY_ISSUER_ID'], issuer_id: ENV['APPLE_API_KEY_ISSUER_ID'],
key_content: ENV['APPLE_API_KEY_CONTENT'], key_content: "#{Base64.decode64(ENV['APPLE_API_KEY_CONTENT'])}".gsub('\n', '\\n'),
is_key_content_base64: true,
duration: 1000,
in_house: false in_house: false
) )
@@ -33,17 +32,19 @@ platform :ios do
lane :fetch_highest_build_number do lane :fetch_highest_build_number do
build_number_candidates = [1] build_number_candidates = [1]
build_number_candidates += latest_testflight_build_number( build_number_candidates << latest_testflight_build_number(
version: package_json['version'], version: package_json['version'],
initial_build_number: 1, initial_build_number: 1,
app_identifier: ENV['IOS_BUNDLE_IDENTIFIER'],
api_key: api_key api_key: api_key
) )
build_number_candidates += app_store_build_number( build_number_candidates << app_store_build_number(
version: package_json['version'], version: package_json['version'],
initial_build_number: 1, initial_build_number: 1,
app_identifier: ENV['IOS_BUNDLE_IDENTIFIER'],
api_key: api_key api_key: api_key
) )
current_build_number = build_number_candidates.compact.max current_build_number = build_number_candidates.max
end end
lane :configure do lane :configure do
@@ -92,7 +93,11 @@ platform :ios do
lane :release do lane :release do
configure configure
build build
#upload_to_app_store(skip_metadata: true, skip_screenshots: true, api_key: api_key) upload_to_app_store(
skip_metadata: true,
skip_screenshots: true,
api_key: api_key
)
end end
desc "Submit a new version to Testflight" desc "Submit a new version to Testflight"