Created
February 8, 2023 18:09
-
-
Save luisfernandezbr/7318a04f23d313824d1c1e8b59929a02 to your computer and use it in GitHub Desktop.
Fastfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import("./iOSCiLanesFastfile") | |
import("./AndroidCiLanesFastfile") | |
####################################################### | |
# PUT IN THIS FILE THE LANES TO RUN LOCALLY # | |
####################################################### | |
default_platform(:ios) | |
platform :ios do | |
desc "Run Firebase Internal Distribution" | |
lane :publish_on_firebase do | |
_sub_match_adhoc() | |
_sub_gym_adhoc() | |
_sub_firebase_ios_app_distribution() | |
end | |
desc "Push a new beta build to TestFlight" | |
lane :publish_on_testflight do | |
_sub_match_appstore() | |
_sub_gym_appstore() | |
_sub_upload_to_testflight() | |
end | |
end | |
platform :android do | |
desc "Run Firebase Internal Distribution" | |
lane :publish_on_firebase do | |
gradle(project_dir: 'android/', task: 'clean ') | |
gradle(project_dir: 'android/', task: 'assemble', build_type: 'Release') | |
_sub_firebase_android_app_distribution() | |
end | |
desc "Deploy a new version to the Google Play" | |
lane :publish_on_google_play do | |
gradle(project_dir: 'android/', task: 'clean') | |
gradle(project_dir: 'android/', task: 'assemble', build_type: 'Release') | |
upload_to_play_store( | |
track: 'alpha', | |
json_key: ENV['SERVICE_ACCOUNT_JSON_FILE'] | |
) | |
end | |
desc "Just validating fastlane config" | |
lane :validate_play_store do | |
validate_play_store_json_key( | |
json_key: ENV['SERVICE_ACCOUNT_JSON_FILE'] | |
) | |
end | |
end | |
package = load_json(json_path: "./package.json") | |
desc 'iOS: Increment build number and set the version to package.json version.' | |
lane :inc_ver_ios do | |
increment_build_number( | |
xcodeproj: './ios/Nursebook.xcodeproj' | |
) | |
increment_version_number( | |
xcodeproj: './ios/Nursebook.xcodeproj', | |
version_number: package['version'] | |
) | |
end | |
desc 'Android: Increment versionCode and set versionName to package.json version.' | |
lane :inc_ver_and do | |
increment_version_code( | |
gradle_file_path: "./android/app/build.gradle", | |
) | |
increment_version_name( | |
gradle_file_path: "./android/app/build.gradle", | |
version_name: package['version'] | |
) | |
end | |
desc 'Bump build numbers, and set the version to match the pacakage.json version.' | |
lane :bump do | |
inc_ver_ios | |
inc_ver_and | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment