|
| 1 | +# This file contains the fastlane.tools configuration |
| 2 | +# You can find the documentation at https://docs.fastlane.tools |
| 3 | +# |
| 4 | +# For a list of all available actions, check out |
| 5 | +# |
| 6 | +# https://docs.fastlane.tools/actions |
| 7 | +# |
| 8 | +# For a list of all available plugins, check out |
| 9 | +# |
| 10 | +# https://docs.fastlane.tools/plugins/available-plugins |
| 11 | +# |
| 12 | + |
| 13 | +# Uncomment the line if you want fastlane to automatically update itself |
| 14 | +# update_fastlane |
| 15 | + |
| 16 | +default_platform(:ios) |
| 17 | + |
| 18 | +# CONFIG VARIABLES |
| 19 | +username = '[email protected]' # The apple id that you are using to admin the certificates eg: [email protected] |
| 20 | +xcodeproj = 'ios-base.xcodeproj' # The xcodeproj name eg: ReactNativeBase.xcodeproj |
| 21 | +workspace = 'ios-base.xcworkspace' # The xworkspace name here eg: ReactNativeBase.xcworkspace |
| 22 | +certificates_git_url = '' # The repo to store and sync certs and provisioning profiles. Eg: [email protected]:rootstrap/cafe-infinity-certificates.git |
| 23 | +team_id = '' # The organization's team id (you can leave this empty and select it on the CLI on each run) |
| 24 | +distribute_external = false # Change this to true if you want the build to be distributed to external testers as well. |
| 25 | +notify_external_testers = false |
| 26 | +skip_waiting_for_build_processing = false # Don't wait for the build to process. If set to true, the changelog won't be set, distribute_external option won't work and no build will be distributed to testers. (You might want to use this option if you are using this action on CI and have to pay for 'minutes used' on your CI plan) |
| 27 | + |
| 28 | +platform :ios do |
| 29 | + lane :release_develop do |
| 30 | + sync_code_signing( |
| 31 | + git_url: certificates_git_url, |
| 32 | + username: username, |
| 33 | + type: 'appstore', |
| 34 | + team_id: team_id |
| 35 | + ) |
| 36 | + |
| 37 | + ensure_git_status_clean |
| 38 | + |
| 39 | + increment_build_number(xcodeproj: xcodeproj) |
| 40 | + |
| 41 | + commit_version_bump(xcodeproj: xcodeproj) |
| 42 | + |
| 43 | + add_git_tag |
| 44 | + |
| 45 | + push_to_git_remote(remote_branch: 'develop') |
| 46 | + |
| 47 | + build_app( |
| 48 | + scheme: 'ios-base-develop', |
| 49 | + workspace: workspace, |
| 50 | + include_bitcode: true, |
| 51 | + export_method: 'app-store' |
| 52 | + ) |
| 53 | + |
| 54 | + changelog = changelog_from_git_commits( |
| 55 | + pretty: "- (%ae) %s",# Optional, lets you provide a custom format to apply to each commit when generating the changelog text |
| 56 | + date_format: "short",# Optional, lets you provide an additional date format to dates within the pretty-formatted string |
| 57 | + match_lightweight_tag: false, # Optional, lets you ignore lightweight (non-annotated) tags when searching for the last tag |
| 58 | + merge_commit_filtering: "exclude_merges" # Optional, lets you filter out merge commits |
| 59 | + ) |
| 60 | + |
| 61 | + upload_to_testflight( |
| 62 | + username: username, |
| 63 | + team_id: team_id, |
| 64 | + changelog: changelog, |
| 65 | + distribute_external: distribute_external, |
| 66 | + notify_external_testers: notify_external_testers, |
| 67 | + skip_waiting_for_build_processing: skip_waiting_for_build_processing |
| 68 | + ) |
| 69 | + end |
| 70 | + |
| 71 | + lane :release_staging do |
| 72 | + sync_code_signing( |
| 73 | + git_url: certificates_git_url, |
| 74 | + username: username, |
| 75 | + type: 'appstore', |
| 76 | + team_id: team_id |
| 77 | + ) |
| 78 | + |
| 79 | + ensure_git_status_clean |
| 80 | + |
| 81 | + increment_build_number(xcodeproj: xcodeproj) |
| 82 | + |
| 83 | + commit_version_bump(xcodeproj: xcodeproj) |
| 84 | + |
| 85 | + add_git_tag |
| 86 | + |
| 87 | + push_to_git_remote(remote_branch: 'develop') |
| 88 | + |
| 89 | + build_app( |
| 90 | + scheme: 'ios-base-staging', |
| 91 | + workspace: workspace, |
| 92 | + include_bitcode: true, |
| 93 | + export_method: 'app-store' |
| 94 | + ) |
| 95 | + |
| 96 | + changelog = changelog_from_git_commits( |
| 97 | + pretty: "- (%ae) %s",# Optional, lets you provide a custom format to apply to each commit when generating the changelog text |
| 98 | + date_format: "short",# Optional, lets you provide an additional date format to dates within the pretty-formatted string |
| 99 | + match_lightweight_tag: false, # Optional, lets you ignore lightweight (non-annotated) tags when searching for the last tag |
| 100 | + merge_commit_filtering: "exclude_merges" # Optional, lets you filter out merge commits |
| 101 | + ) |
| 102 | + |
| 103 | + upload_to_testflight( |
| 104 | + username: username, |
| 105 | + team_id: team_id, |
| 106 | + changelog: changelog, |
| 107 | + distribute_external: distribute_external, |
| 108 | + notify_external_testers: notify_external_testers, |
| 109 | + skip_waiting_for_build_processing: skip_waiting_for_build_processing |
| 110 | + ) |
| 111 | + end |
| 112 | + |
| 113 | + lane :release_production do |
| 114 | + sync_code_signing( |
| 115 | + git_url: prod_certificates_git_url, |
| 116 | + username: username, |
| 117 | + type: 'appstore', |
| 118 | + team_id: team_id |
| 119 | + ) |
| 120 | + |
| 121 | + ensure_git_status_clean |
| 122 | + |
| 123 | + increment_build_number(xcodeproj: xcodeproj) |
| 124 | + |
| 125 | + commit_version_bump(xcodeproj: xcodeproj) |
| 126 | + |
| 127 | + add_git_tag |
| 128 | + |
| 129 | + push_to_git_remote(remote_branch: 'master') |
| 130 | + |
| 131 | + build_app( |
| 132 | + scheme: 'ios-base', |
| 133 | + workspace: workspace, |
| 134 | + include_bitcode: true, |
| 135 | + export_method: 'app-store' |
| 136 | + ) |
| 137 | + |
| 138 | + changelog = changelog_from_git_commits( |
| 139 | + pretty: "- (%ae) %s",# Optional, lets you provide a custom format to apply to each commit when generating the changelog text |
| 140 | + date_format: "short",# Optional, lets you provide an additional date format to dates within the pretty-formatted string |
| 141 | + match_lightweight_tag: false, # Optional, lets you ignore lightweight (non-annotated) tags when searching for the last tag |
| 142 | + merge_commit_filtering: "exclude_merges" # Optional, lets you filter out merge commits |
| 143 | + ) |
| 144 | + |
| 145 | + upload_to_testflight( |
| 146 | + |
| 147 | + team_id: team_id, |
| 148 | + changelog: changelog, |
| 149 | + distribute_external: distribute_external, |
| 150 | + notify_external_testers: notify_external_testers, |
| 151 | + skip_waiting_for_build_processing: skip_waiting_for_build_processing |
| 152 | + ) |
| 153 | + end |
| 154 | + |
| 155 | + lane :build_develop do |
| 156 | + sync_code_signing( |
| 157 | + git_url: certificates_git_url, |
| 158 | + username: username, |
| 159 | + type: 'appstore', |
| 160 | + team_id: team_id |
| 161 | + ) |
| 162 | + |
| 163 | + increment_build_number(xcodeproj: xcodeproj) |
| 164 | + |
| 165 | + build_app( |
| 166 | + scheme: 'ios-base-develop', |
| 167 | + workspace: workspace, |
| 168 | + include_bitcode: true, |
| 169 | + export_method: 'app-store' |
| 170 | + ) |
| 171 | + end |
| 172 | + |
| 173 | + lane :build_staging do |
| 174 | + sync_code_signing( |
| 175 | + git_url: certificates_git_url, |
| 176 | + username: username, |
| 177 | + type: 'appstore', |
| 178 | + team_id: team_id |
| 179 | + ) |
| 180 | + |
| 181 | + increment_build_number(xcodeproj: xcodeproj) |
| 182 | + |
| 183 | + build_app( |
| 184 | + scheme: 'ios-base-staging', |
| 185 | + workspace: workspace, |
| 186 | + include_bitcode: true, |
| 187 | + export_method: 'app-store' |
| 188 | + ) |
| 189 | + end |
| 190 | + |
| 191 | + lane :build_production do |
| 192 | + sync_code_signing( |
| 193 | + git_url: prod_certificates_git_url, |
| 194 | + username: username, |
| 195 | + type: 'appstore', |
| 196 | + team_id: team_id |
| 197 | + ) |
| 198 | + |
| 199 | + increment_build_number(xcodeproj: xcodeproj) |
| 200 | + |
| 201 | + build_app( |
| 202 | + scheme: 'ios-base', |
| 203 | + workspace: workspace, |
| 204 | + include_bitcode: true, |
| 205 | + export_method: 'app-store' |
| 206 | + ) |
| 207 | + end |
| 208 | +end |
| 209 | + |
0 commit comments