refactor: add mulitple customization features

This commit is contained in:
Rainer Killinger
2022-01-28 12:25:48 +01:00
parent 3afeb0e936
commit d22e6ff87f
14 changed files with 226 additions and 304 deletions

View File

@@ -13,26 +13,61 @@
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
require 'json'
default_platform(:ios)
package_json = JSON.parse(File.read('../../package.json'))
platform :ios do
desc "Push a new release build to the App Store"
lane :release do
lane :configure do
set_info_plist_value(
path: "App/Info.plist",
key: "NSLocationAlwaysAndWhenInUseUsageDescription",
value: ENV['LOCATION_USAGE_DESCRIPTION']
)
update_build_settings(
use_automatic_signing: false,
set_info_plist_value(
path: "App/Info.plist",
key: "NSLocationWhenInUseUsageDescription",
value: ENV['LOCATION_USAGE_DESCRIPTION']
)
set_info_plist_value(
path: "App/Info.plist",
key: "NSCalendarsUsageDescription",
value: ENV['CALENDAR_USAGE_DESCRIPTION']
)
update_url_schemes(
path: "App/Info.plist",
url_schemes: [ENV['APP_URL_SCHEME']]
)
update_code_signing_settings(
use_automatic_signing: true,
path: "App.xcodeproj",
team_id: ENV['TEAM_ID'],
bundle_identifier: ENV['IOS_APP_IDENTIFIER'],
profile_name: ENV['PROVISIONING_PROFILE_NAME'],
bundle_identifier: ENV['IOS_BUNDLE_IDENTIFIER'],
entitlements_file_path: "App/App.entitlements"
)
increment_version_number(
version_number: package_json['version'],
xcodeproj: "App.xcodeproj"
)
end
lane :build do
build_app(workspace: "App.xcworkspace", scheme: "App")
# upload_to_app_store(skip_metadata: true, skip_screenshots: true)
end
lane :release do
configure
build
#upload_to_app_store(skip_metadata: true, skip_screenshots: true)
end
lane :beta do
configure
build
upload_to_testflight(skip_submission: true)
end
end