2021-01-31 03:09:35 +01:00
|
|
|
$ExpoSDK = '40.0.0'
|
2021-02-01 02:16:53 +01:00
|
|
|
$NativeVersion = '210201' # Update when there is native module change
|
2021-01-31 03:09:35 +01:00
|
|
|
|
|
|
|
fastlane_version '2.172.0'
|
|
|
|
|
|
|
|
platform :ios do
|
|
|
|
desc 'Build and deploy'
|
|
|
|
private_lane :build do |options|
|
2021-02-01 02:16:53 +01:00
|
|
|
branch = 'NATIVEVERSION-TYPE'.gsub('NATIVEVERSION', $NativeVersion).gsub('TYPE', options[:type])
|
|
|
|
set_info_plist_value(
|
|
|
|
path: './ios/tooot/Supporting/Expo.plist',
|
|
|
|
key: 'EXUpdatesSDKVersion',
|
|
|
|
value: $ExpoSDK
|
|
|
|
)
|
|
|
|
set_info_plist_value(
|
|
|
|
path: './ios/tooot/Supporting/Expo.plist',
|
|
|
|
key: 'EXUpdatesReleaseChannel',
|
|
|
|
value: branch
|
|
|
|
)
|
2021-01-31 03:09:35 +01:00
|
|
|
|
|
|
|
case options[:type]
|
|
|
|
when 'staging', 'production'
|
|
|
|
ensure_git_branch(
|
2021-02-01 02:16:53 +01:00
|
|
|
branch: options[:type]
|
2021-01-31 03:09:35 +01:00
|
|
|
)
|
|
|
|
ensure_git_status_clean
|
2021-02-01 02:16:53 +01:00
|
|
|
increment_build_number(
|
|
|
|
build_number: $NativeVersion
|
|
|
|
)
|
|
|
|
app_store_connect_api_key(
|
|
|
|
key_filepath: "appstore.p8"
|
|
|
|
)
|
2021-01-31 03:09:35 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
match(
|
|
|
|
type: options[:type],
|
|
|
|
readonly: true
|
|
|
|
)
|
|
|
|
|
|
|
|
case options[:type]
|
|
|
|
when 'development'
|
|
|
|
build_ios_app(
|
|
|
|
scheme: 'tooot',
|
|
|
|
silent: true,
|
|
|
|
include_bitcode: true,
|
|
|
|
workspace: './ios/tooot.xcworkspace',
|
|
|
|
export_method: 'development'
|
|
|
|
)
|
|
|
|
install_on_device(
|
2021-02-01 02:16:53 +01:00
|
|
|
skip_wifi: true
|
2021-01-31 03:09:35 +01:00
|
|
|
)
|
|
|
|
when 'staging'
|
|
|
|
build_ios_app(
|
|
|
|
scheme: 'tooot',
|
|
|
|
workspace: './ios/tooot.xcworkspace'
|
|
|
|
)
|
|
|
|
upload_to_testflight(
|
2021-02-01 02:16:53 +01:00
|
|
|
skip_submission: true,
|
|
|
|
notify_external_testers: false
|
2021-01-31 03:09:35 +01:00
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
desc 'Build development to phone'
|
|
|
|
lane :development do
|
|
|
|
build(type: 'development')
|
|
|
|
end
|
|
|
|
|
|
|
|
desc 'Build staging to TestFlight'
|
|
|
|
lane :staging do
|
|
|
|
build(type: 'staging')
|
|
|
|
end
|
|
|
|
|
|
|
|
desc 'Build product to App Store'
|
|
|
|
lane :production do
|
|
|
|
build(type: 'production')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
platform :android do
|
|
|
|
# Android Lanes
|
|
|
|
end
|