tooot/fastlane/Fastfile

82 lines
1.8 KiB
Ruby

$ExpoSDK = '40.0.0'
$NativeVersion = '210201' # Update when there is native module change
fastlane_version '2.172.0'
platform :ios do
desc 'Build and deploy'
private_lane :build do |options|
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
)
case options[:type]
when 'staging', 'production'
ensure_git_branch(
branch: options[:type]
)
ensure_git_status_clean
increment_build_number(
build_number: $NativeVersion
)
app_store_connect_api_key(
key_filepath: "appstore.p8"
)
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(
skip_wifi: true
)
when 'staging'
build_ios_app(
scheme: 'tooot',
workspace: './ios/tooot.xcworkspace'
)
upload_to_testflight(
skip_submission: true,
notify_external_testers: false
)
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