fastlane 2.173.0 → 2.194.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (391) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +105 -85
  4. data/cert/lib/cert/commands_generator.rb +2 -1
  5. data/cert/lib/cert/options.rb +4 -3
  6. data/cert/lib/cert/runner.rb +7 -7
  7. data/deliver/lib/assets/summary.html.erb +10 -10
  8. data/deliver/lib/deliver/app_screenshot.rb +8 -3
  9. data/deliver/lib/deliver/app_screenshot_iterator.rb +2 -2
  10. data/deliver/lib/deliver/commands_generator.rb +3 -2
  11. data/deliver/lib/deliver/detect_values.rb +5 -3
  12. data/deliver/lib/deliver/download_screenshots.rb +2 -3
  13. data/deliver/lib/deliver/html_generator.rb +2 -2
  14. data/deliver/lib/deliver/languages.rb +1 -1
  15. data/deliver/lib/deliver/loader.rb +1 -1
  16. data/deliver/lib/deliver/module.rb +6 -0
  17. data/deliver/lib/deliver/options.rb +48 -56
  18. data/deliver/lib/deliver/runner.rb +28 -15
  19. data/deliver/lib/deliver/screenshot_comparable.rb +62 -0
  20. data/deliver/lib/deliver/setup.rb +1 -2
  21. data/deliver/lib/deliver/submit_for_review.rb +4 -4
  22. data/deliver/lib/deliver/sync_screenshots.rb +200 -0
  23. data/deliver/lib/deliver/upload_metadata.rb +26 -11
  24. data/deliver/lib/deliver/upload_price_tier.rb +1 -1
  25. data/deliver/lib/deliver/upload_screenshots.rb +13 -12
  26. data/fastlane/lib/assets/completions/completion.bash +4 -1
  27. data/fastlane/lib/assets/completions/completion.zsh +6 -5
  28. data/{spaceship/lib/spaceship/connect_api/models/.app_store_version_submission.rb.swp → fastlane/lib/fastlane/actions/.notarize.rb.swp} +0 -0
  29. data/fastlane/lib/fastlane/actions/actions_helper.rb +2 -2
  30. data/fastlane/lib/fastlane/actions/adb.rb +2 -5
  31. data/fastlane/lib/fastlane/actions/adb_devices.rb +0 -1
  32. data/fastlane/lib/fastlane/actions/add_git_tag.rb +4 -4
  33. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +18 -18
  34. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +21 -7
  35. data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
  36. data/fastlane/lib/fastlane/actions/appetize.rb +13 -8
  37. data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +0 -11
  38. data/fastlane/lib/fastlane/actions/appium.rb +40 -65
  39. data/fastlane/lib/fastlane/actions/appledoc.rb +45 -45
  40. data/fastlane/lib/fastlane/actions/apteligent.rb +3 -2
  41. data/fastlane/lib/fastlane/actions/artifactory.rb +5 -6
  42. data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +7 -13
  43. data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
  44. data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +3 -3
  45. data/fastlane/lib/fastlane/actions/badge.rb +9 -13
  46. data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +11 -5
  47. data/fastlane/lib/fastlane/actions/build_app.rb +4 -0
  48. data/fastlane/lib/fastlane/actions/bundle_install.rb +21 -11
  49. data/fastlane/lib/fastlane/actions/carthage.rb +22 -14
  50. data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +8 -17
  51. data/fastlane/lib/fastlane/actions/chatwork.rb +3 -2
  52. data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +9 -1
  53. data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +0 -1
  54. data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +25 -2
  55. data/fastlane/lib/fastlane/actions/clipboard.rb +3 -6
  56. data/fastlane/lib/fastlane/actions/cloc.rb +9 -13
  57. data/fastlane/lib/fastlane/actions/cocoapods.rb +23 -15
  58. data/fastlane/lib/fastlane/actions/commit_github_file.rb +12 -4
  59. data/fastlane/lib/fastlane/actions/commit_version_bump.rb +6 -7
  60. data/fastlane/lib/fastlane/actions/copy_artifacts.rb +3 -4
  61. data/fastlane/lib/fastlane/actions/crashlytics.rb +7 -11
  62. data/fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb +70 -76
  63. data/fastlane/lib/fastlane/actions/create_keychain.rb +13 -11
  64. data/fastlane/lib/fastlane/actions/create_pull_request.rb +0 -9
  65. data/fastlane/lib/fastlane/actions/create_xcframework.rb +102 -17
  66. data/fastlane/lib/fastlane/actions/danger.rb +13 -12
  67. data/fastlane/lib/fastlane/actions/deploygate.rb +1 -2
  68. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
  69. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +29 -30
  70. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +3 -3
  71. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +171 -67
  72. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +19 -2
  73. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +8 -2
  74. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +37 -18
  75. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
  76. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +10 -4
  77. data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +1 -1
  78. data/fastlane/lib/fastlane/actions/download_dsyms.rb +8 -19
  79. data/fastlane/lib/fastlane/actions/dsym_zip.rb +1 -1
  80. data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +2 -6
  81. data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +0 -1
  82. data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +3 -4
  83. data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +3 -5
  84. data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -2
  85. data/fastlane/lib/fastlane/actions/environment_variable.rb +13 -21
  86. data/fastlane/lib/fastlane/actions/erb.rb +2 -5
  87. data/fastlane/lib/fastlane/actions/get_build_number_repository.rb +1 -1
  88. data/fastlane/lib/fastlane/actions/get_certificates.rb +5 -1
  89. data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
  90. data/fastlane/lib/fastlane/actions/get_ipa_info_plist_value.rb +0 -1
  91. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +32 -35
  92. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +10 -2
  93. data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
  94. data/fastlane/lib/fastlane/actions/get_version_number.rb +17 -10
  95. data/fastlane/lib/fastlane/actions/git_add.rb +5 -10
  96. data/fastlane/lib/fastlane/actions/git_branch.rb +4 -10
  97. data/fastlane/lib/fastlane/actions/git_commit.rb +6 -8
  98. data/fastlane/lib/fastlane/actions/git_pull.rb +4 -10
  99. data/fastlane/lib/fastlane/actions/git_remote_branch.rb +57 -0
  100. data/fastlane/lib/fastlane/actions/git_submodule_update.rb +16 -8
  101. data/fastlane/lib/fastlane/actions/git_tag_exists.rb +4 -0
  102. data/fastlane/lib/fastlane/actions/github_api.rb +4 -6
  103. data/fastlane/lib/fastlane/actions/gradle.rb +13 -21
  104. data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +1 -1
  105. data/fastlane/lib/fastlane/actions/hg_push.rb +1 -1
  106. data/fastlane/lib/fastlane/actions/hipchat.rb +6 -6
  107. data/fastlane/lib/fastlane/actions/hockey.rb +5 -12
  108. data/fastlane/lib/fastlane/actions/ifttt.rb +3 -6
  109. data/fastlane/lib/fastlane/actions/import_from_git.rb +7 -9
  110. data/fastlane/lib/fastlane/actions/increment_build_number.rb +8 -2
  111. data/fastlane/lib/fastlane/actions/install_on_device.rb +3 -6
  112. data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +4 -0
  113. data/fastlane/lib/fastlane/actions/installr.rb +22 -25
  114. data/fastlane/lib/fastlane/actions/ipa.rb +2 -2
  115. data/fastlane/lib/fastlane/actions/jazzy.rb +11 -8
  116. data/fastlane/lib/fastlane/actions/jira.rb +61 -14
  117. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +7 -7
  118. data/fastlane/lib/fastlane/actions/lcov.rb +0 -4
  119. data/fastlane/lib/fastlane/actions/mailgun.rb +21 -27
  120. data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +1 -1
  121. data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
  122. data/fastlane/lib/fastlane/actions/modify_services.rb +59 -24
  123. data/fastlane/lib/fastlane/actions/nexus_upload.rb +2 -2
  124. data/fastlane/lib/fastlane/actions/notarize.rb +181 -52
  125. data/fastlane/lib/fastlane/actions/notification.rb +1 -1
  126. data/fastlane/lib/fastlane/actions/number_of_commits.rb +1 -1
  127. data/fastlane/lib/fastlane/actions/oclint.rb +15 -14
  128. data/fastlane/lib/fastlane/actions/pod_push.rb +0 -2
  129. data/fastlane/lib/fastlane/actions/podio_item.rb +0 -7
  130. data/fastlane/lib/fastlane/actions/prompt.rb +3 -4
  131. data/fastlane/lib/fastlane/actions/push_git_tags.rb +2 -2
  132. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +6 -3
  133. data/fastlane/lib/fastlane/actions/puts.rb +1 -2
  134. data/fastlane/lib/fastlane/actions/register_device.rb +10 -13
  135. data/fastlane/lib/fastlane/actions/register_devices.rb +10 -14
  136. data/fastlane/lib/fastlane/actions/reset_git_repo.rb +5 -8
  137. data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +0 -2
  138. data/fastlane/lib/fastlane/actions/resign.rb +2 -9
  139. data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
  140. data/fastlane/lib/fastlane/actions/rsync.rb +3 -6
  141. data/fastlane/lib/fastlane/actions/run_tests.rb +1 -1
  142. data/fastlane/lib/fastlane/actions/s3.rb +1 -1
  143. data/fastlane/lib/fastlane/actions/say.rb +2 -3
  144. data/fastlane/lib/fastlane/actions/scp.rb +4 -10
  145. data/fastlane/lib/fastlane/actions/set_build_number_repository.rb +1 -1
  146. data/fastlane/lib/fastlane/actions/set_changelog.rb +11 -14
  147. data/fastlane/lib/fastlane/actions/set_github_release.rb +2 -8
  148. data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +1 -1
  149. data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -4
  150. data/fastlane/lib/fastlane/actions/setup_ci.rb +1 -2
  151. data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +1 -1
  152. data/fastlane/lib/fastlane/actions/setup_jenkins.rb +7 -12
  153. data/fastlane/lib/fastlane/actions/setup_travis.rb +1 -1
  154. data/fastlane/lib/fastlane/actions/sh.rb +2 -4
  155. data/fastlane/lib/fastlane/actions/slack.rb +161 -141
  156. data/fastlane/lib/fastlane/actions/slather.rb +9 -19
  157. data/fastlane/lib/fastlane/actions/sonar.rb +12 -19
  158. data/fastlane/lib/fastlane/actions/sourcedocs.rb +128 -0
  159. data/fastlane/lib/fastlane/actions/spaceship_logs.rb +1 -1
  160. data/fastlane/lib/fastlane/actions/splunkmint.rb +2 -2
  161. data/fastlane/lib/fastlane/actions/spm.rb +3 -3
  162. data/fastlane/lib/fastlane/actions/ssh.rb +5 -10
  163. data/fastlane/lib/fastlane/actions/swiftlint.rb +18 -16
  164. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +7 -2
  165. data/fastlane/lib/fastlane/actions/testfairy.rb +0 -1
  166. data/fastlane/lib/fastlane/actions/tryouts.rb +2 -3
  167. data/fastlane/lib/fastlane/actions/twitter.rb +0 -5
  168. data/fastlane/lib/fastlane/actions/unlock_keychain.rb +3 -3
  169. data/fastlane/lib/fastlane/actions/update_app_group_identifiers.rb +1 -4
  170. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +8 -15
  171. data/fastlane/lib/fastlane/actions/update_fastlane.rb +2 -2
  172. data/fastlane/lib/fastlane/actions/update_icloud_container_identifiers.rb +1 -4
  173. data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
  174. data/fastlane/lib/fastlane/actions/update_keychain_access_groups.rb +1 -4
  175. data/fastlane/lib/fastlane/actions/update_plist.rb +1 -1
  176. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +3 -4
  177. data/fastlane/lib/fastlane/actions/update_urban_airship_configuration.rb +0 -1
  178. data/fastlane/lib/fastlane/actions/update_url_schemes.rb +15 -26
  179. data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +1 -2
  180. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +8 -7
  181. data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +3 -10
  182. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +5 -1
  183. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +10 -3
  184. data/fastlane/lib/fastlane/actions/validate_play_store_json_key.rb +40 -44
  185. data/fastlane/lib/fastlane/actions/version_get_podspec.rb +1 -2
  186. data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +3 -3
  187. data/fastlane/lib/fastlane/actions/xcodebuild.rb +5 -5
  188. data/fastlane/lib/fastlane/actions/zip.rb +86 -21
  189. data/fastlane/lib/fastlane/cli_tools_distributor.rb +1 -1
  190. data/fastlane/lib/fastlane/commands_generator.rb +2 -1
  191. data/fastlane/lib/fastlane/documentation/actions_list.rb +2 -2
  192. data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
  193. data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +12 -6
  194. data/fastlane/lib/fastlane/environment_printer.rb +1 -0
  195. data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
  196. data/fastlane/lib/fastlane/fast_file.rb +19 -7
  197. data/fastlane/lib/fastlane/fastlane_require.rb +7 -1
  198. data/fastlane/lib/fastlane/features.rb +3 -0
  199. data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
  200. data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +4 -4
  201. data/fastlane/lib/fastlane/helper/gem_helper.rb +2 -2
  202. data/fastlane/lib/fastlane/helper/git_helper.rb +34 -5
  203. data/fastlane/lib/fastlane/lane_manager.rb +3 -2
  204. data/fastlane/lib/fastlane/notification/slack.rb +56 -0
  205. data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -2
  206. data/fastlane/lib/fastlane/plugins/plugin_info.rb +2 -2
  207. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -2
  208. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -3
  209. data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +7 -6
  210. data/fastlane/lib/fastlane/plugins/template/.circleci/config.yml +1 -1
  211. data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +1 -1
  212. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +30 -35
  213. data/fastlane/lib/fastlane/plugins/template/spec/spec_helper.rb.erb +1 -1
  214. data/fastlane/lib/fastlane/setup/setup.rb +23 -10
  215. data/fastlane/lib/fastlane/setup/setup_ios.rb +3 -3
  216. data/fastlane/lib/fastlane/swift_fastlane_function.rb +43 -15
  217. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +2 -0
  218. data/fastlane/lib/fastlane/version.rb +2 -2
  219. data/fastlane/swift/Actions.swift +1 -1
  220. data/fastlane/swift/Appfile.swift +1 -1
  221. data/fastlane/swift/ArgumentProcessor.swift +1 -1
  222. data/fastlane/swift/ControlCommand.swift +1 -1
  223. data/fastlane/swift/Deliverfile.swift +1 -1
  224. data/fastlane/swift/DeliverfileProtocol.swift +27 -23
  225. data/fastlane/swift/Fastlane.swift +7993 -4352
  226. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +4 -0
  227. data/fastlane/swift/Gymfile.swift +1 -1
  228. data/fastlane/swift/GymfileProtocol.swift +1 -1
  229. data/fastlane/swift/LaneFileProtocol.swift +10 -4
  230. data/fastlane/swift/MainProcess.swift +1 -1
  231. data/fastlane/swift/Matchfile.swift +1 -1
  232. data/fastlane/swift/MatchfileProtocol.swift +3 -3
  233. data/fastlane/swift/OptionalConfigValue.swift +101 -0
  234. data/fastlane/swift/Plugins.swift +1 -1
  235. data/fastlane/swift/Precheckfile.swift +1 -1
  236. data/fastlane/swift/PrecheckfileProtocol.swift +4 -4
  237. data/fastlane/swift/RubyCommand.swift +2 -2
  238. data/fastlane/swift/RubyCommandable.swift +1 -1
  239. data/fastlane/swift/Runner.swift +2 -2
  240. data/fastlane/swift/RunnerArgument.swift +1 -1
  241. data/fastlane/swift/Scanfile.swift +1 -1
  242. data/fastlane/swift/ScanfileProtocol.swift +17 -1
  243. data/fastlane/swift/Screengrabfile.swift +1 -1
  244. data/fastlane/swift/ScreengrabfileProtocol.swift +4 -4
  245. data/fastlane/swift/Snapshotfile.swift +1 -1
  246. data/fastlane/swift/SnapshotfileProtocol.swift +5 -1
  247. data/fastlane/swift/SocketClient.swift +3 -2
  248. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  249. data/fastlane/swift/SocketResponse.swift +5 -3
  250. data/fastlane/swift/formatting/Brewfile.lock.json +37 -21
  251. data/fastlane/swift/main.swift +1 -1
  252. data/fastlane/swift/upgrade_manifest.json +1 -1
  253. data/fastlane_core/lib/fastlane_core/build_watcher.rb +113 -17
  254. data/fastlane_core/lib/fastlane_core/clipboard.rb +20 -0
  255. data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -9
  256. data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +6 -1
  257. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +41 -3
  258. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +14 -8
  259. data/fastlane_core/lib/fastlane_core/device_manager.rb +1 -1
  260. data/fastlane_core/lib/fastlane_core/helper.rb +66 -10
  261. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
  262. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +14 -8
  263. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +12 -5
  264. data/fastlane_core/lib/fastlane_core/languages.rb +2 -2
  265. data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +5 -0
  266. data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
  267. data/fastlane_core/lib/fastlane_core/print_table.rb +5 -3
  268. data/fastlane_core/lib/fastlane_core/project.rb +30 -23
  269. data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +4 -4
  270. data/fastlane_core/lib/fastlane_core/swag.rb +1 -1
  271. data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +1 -0
  272. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +41 -0
  273. data/fastlane_core/lib/fastlane_core/ui/help.erb +35 -0
  274. data/fastlane_core/lib/fastlane_core/ui/help_formatter.rb +16 -0
  275. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +16 -2
  276. data/fastlane_core/lib/fastlane_core/ui/interface.rb +1 -1
  277. data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +2 -2
  278. data/fastlane_core/lib/fastlane_core.rb +22 -20
  279. data/frameit/lib/frameit/commands_generator.rb +2 -1
  280. data/frameit/lib/frameit/config_parser.rb +2 -2
  281. data/frameit/lib/frameit/frame_downloader.rb +2 -1
  282. data/gym/lib/gym/code_signing_mapping.rb +2 -2
  283. data/gym/lib/gym/commands_generator.rb +2 -1
  284. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  285. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +19 -13
  286. data/gym/lib/gym/runner.rb +15 -4
  287. data/match/lib/match/change_password.rb +3 -3
  288. data/match/lib/match/commands_generator.rb +2 -1
  289. data/match/lib/match/encryption/interface.rb +1 -1
  290. data/match/lib/match/encryption/openssl.rb +2 -2
  291. data/match/lib/match/importer.rb +9 -10
  292. data/match/lib/match/migrate.rb +2 -3
  293. data/match/lib/match/module.rb +1 -0
  294. data/match/lib/match/nuke.rb +10 -10
  295. data/match/lib/match/options.rb +5 -4
  296. data/match/lib/match/runner.rb +12 -12
  297. data/match/lib/match/spaceship_ensure.rb +3 -0
  298. data/match/lib/match/storage/google_cloud_storage.rb +2 -2
  299. data/match/lib/match/storage/s3_storage.rb +2 -2
  300. data/pem/lib/pem/commands_generator.rb +2 -1
  301. data/pilot/lib/pilot/build_manager.rb +45 -15
  302. data/pilot/lib/pilot/commands_generator.rb +2 -1
  303. data/pilot/lib/pilot/manager.rb +14 -9
  304. data/pilot/lib/pilot/options.rb +39 -11
  305. data/pilot/lib/pilot/tester_exporter.rb +0 -1
  306. data/pilot/lib/pilot/tester_manager.rb +0 -1
  307. data/pilot/lib/pilot.rb +0 -1
  308. data/precheck/lib/precheck/commands_generator.rb +2 -1
  309. data/precheck/lib/precheck/module.rb +2 -0
  310. data/precheck/lib/precheck/options.rb +7 -6
  311. data/precheck/lib/precheck/runner.rb +13 -8
  312. data/produce/lib/produce/commands_generator.rb +129 -28
  313. data/produce/lib/produce/developer_center.rb +42 -4
  314. data/produce/lib/produce/options.rb +1 -1
  315. data/produce/lib/produce/service.rb +285 -179
  316. data/scan/lib/scan/commands_generator.rb +2 -1
  317. data/scan/lib/scan/detect_values.rb +26 -14
  318. data/scan/lib/scan/module.rb +1 -0
  319. data/scan/lib/scan/options.rb +32 -6
  320. data/scan/lib/scan/runner.rb +81 -1
  321. data/scan/lib/scan/test_command_generator.rb +37 -12
  322. data/scan/lib/scan/xcpretty_reporter_options_generator.rb +1 -1
  323. data/screengrab/lib/screengrab/android_environment.rb +5 -53
  324. data/screengrab/lib/screengrab/commands_generator.rb +2 -1
  325. data/screengrab/lib/screengrab/dependency_checker.rb +0 -20
  326. data/screengrab/lib/screengrab/options.rb +5 -2
  327. data/screengrab/lib/screengrab/runner.rb +110 -109
  328. data/sigh/lib/assets/resign.sh +81 -61
  329. data/sigh/lib/sigh/commands_generator.rb +2 -1
  330. data/sigh/lib/sigh/download_all.rb +4 -8
  331. data/sigh/lib/sigh/options.rb +6 -4
  332. data/sigh/lib/sigh/runner.rb +8 -8
  333. data/snapshot/lib/assets/SnapfileTemplate +3 -2
  334. data/snapshot/lib/assets/SnapfileTemplate.swift +2 -1
  335. data/snapshot/lib/assets/SnapshotHelper.swift +14 -10
  336. data/snapshot/lib/snapshot/commands_generator.rb +3 -1
  337. data/snapshot/lib/snapshot/options.rb +5 -0
  338. data/snapshot/lib/snapshot/reports_generator.rb +7 -1
  339. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  340. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +1 -1
  341. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +12 -6
  342. data/snapshot/lib/snapshot/test_command_generator.rb +17 -3
  343. data/spaceship/README.md +4 -14
  344. data/spaceship/lib/spaceship/base.rb +2 -2
  345. data/spaceship/lib/spaceship/client.rb +37 -20
  346. data/spaceship/lib/spaceship/commands_generator.rb +4 -2
  347. data/spaceship/lib/spaceship/connect_api/api_client.rb +80 -8
  348. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  349. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +36 -4
  350. data/spaceship/lib/spaceship/connect_api/models/app.rb +10 -2
  351. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +10 -0
  352. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +5 -0
  353. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +1 -1
  354. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +5 -0
  355. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +2 -3
  356. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +6 -0
  357. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +8 -1
  358. data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +3 -1
  359. data/spaceship/lib/spaceship/connect_api/models/build.rb +14 -1
  360. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +8 -0
  361. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +32 -0
  362. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +84 -21
  363. data/spaceship/lib/spaceship/connect_api/models/capabilities.rb +27 -0
  364. data/spaceship/lib/spaceship/connect_api/models/profile.rb +6 -0
  365. data/spaceship/lib/spaceship/connect_api/models/user.rb +17 -3
  366. data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +37 -3
  367. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +104 -2
  368. data/spaceship/lib/spaceship/connect_api/testflight/client.rb +3 -0
  369. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +72 -5
  370. data/spaceship/lib/spaceship/connect_api/token.rb +19 -4
  371. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +3 -0
  372. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +19 -2
  373. data/spaceship/lib/spaceship/connect_api/users/client.rb +3 -0
  374. data/spaceship/lib/spaceship/connect_api/users/users.rb +58 -3
  375. data/spaceship/lib/spaceship/connect_api.rb +1 -0
  376. data/spaceship/lib/spaceship/playground.rb +2 -2
  377. data/spaceship/lib/spaceship/spaceauth_runner.rb +38 -15
  378. data/spaceship/lib/spaceship/tunes/members.rb +1 -1
  379. data/spaceship/lib/spaceship/tunes/tunes_client.rb +5 -2
  380. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +42 -29
  381. data/spaceship/lib/spaceship/ui.rb +2 -2
  382. data/supply/lib/supply/client.rb +45 -4
  383. data/supply/lib/supply/commands_generator.rb +2 -1
  384. data/supply/lib/supply/options.rb +14 -2
  385. data/supply/lib/supply/uploader.rb +13 -9
  386. metadata +119 -98
  387. data/fastlane/lib/fastlane/.erb_template_helper.rb.swp +0 -0
  388. data/fastlane/lib/fastlane/actions/.git_commit.rb.swp +0 -0
  389. data/pilot/lib/pilot/features.rb +0 -0
  390. data/pilot/lib/pilot/tester_util.rb +0 -0
  391. data/spaceship/lib/spaceship/.DS_Store +0 -0
@@ -4,6 +4,7 @@
4
4
  # because of
5
5
  # `incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)`
6
6
 
7
+ require 'addressable/uri'
7
8
  require 'tempfile'
8
9
  require 'xcodeproj'
9
10
 
@@ -81,28 +82,33 @@ module Gym
81
82
  Gym.cache[:ipa_path]
82
83
  end
83
84
 
84
- def pkg_path
85
- path = Gym.cache[:pkg_path]
85
+ def binary_path
86
+ path = Gym.cache[:binary_path]
86
87
  return path if path
87
88
 
88
89
  path = Dir[File.join(temporary_output_path, "*.pkg")].last
89
- # We need to process generic PKG
90
+ app_path = Dir[File.join(temporary_output_path, "*.app")].last
91
+ # We need to process generic PKG or APP
90
92
  if path
91
93
  # Try to find PKG file in the output directory, used when app thinning was not set
92
- Gym.cache[:pkg_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
93
- FileUtils.mv(path, Gym.cache[:pkg_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:pkg_path]).downcase).zero?
94
+ Gym.cache[:binary_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
95
+ FileUtils.mv(path, Gym.cache[:binary_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:binary_path]).downcase).zero?
94
96
  elsif Dir.exist?(apps_path)
95
97
  # Try to find "generic" PKG file inside "Apps" folder, used when app thinning was set
96
98
  files = Dir[File.join(apps_path, "*.pkg")]
97
99
  # Generic PKG file doesn't have suffix so its name is the shortest
98
100
  path = files.min_by(&:length)
99
- Gym.cache[:pkg_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
100
- FileUtils.cp(path, Gym.cache[:pkg_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:pkg_path]).downcase).zero?
101
+ Gym.cache[:binary_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.pkg")
102
+ FileUtils.cp(path, Gym.cache[:binary_path]) unless File.expand_path(path).casecmp(File.expand_path(Gym.cache[:binary_path]).downcase).zero?
103
+ elsif app_path
104
+ # Try to find .app file in the output directory. This is used when macOS is set and .app is being generated.
105
+ Gym.cache[:binary_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.app")
106
+ FileUtils.mv(app_path, Gym.cache[:binary_path]) unless File.expand_path(app_path).casecmp(File.expand_path(Gym.cache[:binary_path]).downcase).zero?
101
107
  else
102
108
  ErrorHandler.handle_empty_pkg unless path
103
109
  end
104
110
 
105
- Gym.cache[:pkg_path]
111
+ Gym.cache[:binary_path]
106
112
  end
107
113
 
108
114
  # The path the the dsym file for this app. Might be nil
@@ -149,12 +155,12 @@ module Gym
149
155
 
150
156
  def normalize_export_options(hash)
151
157
  # Normalize some values
152
- hash[:onDemandResourcesAssetPacksBaseURL] = URI.escape(hash[:onDemandResourcesAssetPacksBaseURL]) if hash[:onDemandResourcesAssetPacksBaseURL]
158
+ hash[:onDemandResourcesAssetPacksBaseURL] = Addressable::URI.encode(hash[:onDemandResourcesAssetPacksBaseURL]) if hash[:onDemandResourcesAssetPacksBaseURL]
153
159
  if hash[:manifest]
154
- hash[:manifest][:appURL] = URI.escape(hash[:manifest][:appURL]) if hash[:manifest][:appURL]
155
- hash[:manifest][:displayImageURL] = URI.escape(hash[:manifest][:displayImageURL]) if hash[:manifest][:displayImageURL]
156
- hash[:manifest][:fullSizeImageURL] = URI.escape(hash[:manifest][:fullSizeImageURL]) if hash[:manifest][:fullSizeImageURL]
157
- hash[:manifest][:assetPackManifestURL] = URI.escape(hash[:manifest][:assetPackManifestURL]) if hash[:manifest][:assetPackManifestURL]
160
+ hash[:manifest][:appURL] = Addressable::URI.encode(hash[:manifest][:appURL]) if hash[:manifest][:appURL]
161
+ hash[:manifest][:displayImageURL] = Addressable::URI.encode(hash[:manifest][:displayImageURL]) if hash[:manifest][:displayImageURL]
162
+ hash[:manifest][:fullSizeImageURL] = Addressable::URI.encode(hash[:manifest][:fullSizeImageURL]) if hash[:manifest][:fullSizeImageURL]
163
+ hash[:manifest][:assetPackManifestURL] = Addressable::URI.encode(hash[:manifest][:assetPackManifestURL]) if hash[:manifest][:assetPackManifestURL]
158
164
  end
159
165
  hash
160
166
  end
@@ -243,12 +243,16 @@ module Gym
243
243
  # Moves over the binary and dsym file to the output directory
244
244
  # @return (String) The path to the resulting pkg file
245
245
  def move_pkg
246
- FileUtils.mv(PackageCommandGenerator.pkg_path, File.expand_path(Gym.config[:output_directory]), force: true)
247
- pkg_path = File.expand_path(File.join(Gym.config[:output_directory], File.basename(PackageCommandGenerator.pkg_path)))
246
+ binary_path = File.expand_path(File.join(Gym.config[:output_directory], File.basename(PackageCommandGenerator.binary_path)))
247
+ if File.exist?(binary_path)
248
+ UI.important(" Removing #{File.basename(binary_path)}") if FastlaneCore::Globals.verbose?
249
+ FileUtils.rm_rf(binary_path)
250
+ end
251
+ FileUtils.mv(PackageCommandGenerator.binary_path, File.expand_path(Gym.config[:output_directory]), force: true)
248
252
 
249
253
  UI.success("Successfully exported and signed the pkg file:")
250
- UI.message(pkg_path)
251
- pkg_path
254
+ UI.message(binary_path)
255
+ binary_path
252
256
  end
253
257
 
254
258
  # copys framework from temp folder:
@@ -274,6 +278,13 @@ module Gym
274
278
  exe_name = Gym.project.build_settings(key: "EXECUTABLE_NAME")
275
279
  app_path = File.join(BuildCommandGenerator.archive_path, "Products/Applications/#{exe_name}.app")
276
280
 
281
+ unless File.exist?(app_path)
282
+ # Apparently the `EXECUTABLE_NAME` is not correct. This can happen when building a workspace which has a project
283
+ # earlier in the build order that has a different `EXECUTABLE_NAME` than the app. Try to find the last `.app` as
284
+ # a fallback for this situation.
285
+ app_path = Dir[File.join(BuildCommandGenerator.archive_path, "Products", "Applications", "*.app")].last
286
+ end
287
+
277
288
  UI.crash!("Couldn't find application in '#{BuildCommandGenerator.archive_path}'") unless File.exist?(app_path)
278
289
 
279
290
  joined_app_path = File.join(Gym.config[:output_directory], File.basename(app_path))
@@ -16,7 +16,7 @@ module Match
16
16
 
17
17
  ensure_ui_interactive
18
18
 
19
- to = FastlaneCore::Helper.ask_password(message: "New passphrase for Git Repo: ", confirm: true)
19
+ new_password = FastlaneCore::Helper.ask_password(message: "New passphrase for Git Repo: ", confirm: true)
20
20
 
21
21
  # Choose the right storage and encryption implementations
22
22
  storage = Storage.for_mode(params[:storage_mode], {
@@ -37,10 +37,10 @@ module Match
37
37
  encryption.decrypt_files
38
38
 
39
39
  encryption.clear_password
40
- encryption.store_password(to)
40
+ encryption.store_password(new_password)
41
41
 
42
42
  message = "[fastlane] Changed passphrase"
43
- files_to_commit = encryption.encrypt_files
43
+ files_to_commit = encryption.encrypt_files(password: new_password)
44
44
  storage.save_changes!(files_to_commit: files_to_commit, custom_message: message)
45
45
  end
46
46
 
@@ -1,6 +1,7 @@
1
1
  require 'commander'
2
2
 
3
3
  require 'fastlane_core/configuration/configuration'
4
+ require 'fastlane_core/ui/help_formatter'
4
5
 
5
6
  require_relative 'nuke'
6
7
  require_relative 'change_password'
@@ -32,7 +33,7 @@ module Match
32
33
  program :help, 'Author', 'Felix Krause <match@krausefx.com>'
33
34
  program :help, 'Website', 'https://fastlane.tools'
34
35
  program :help, 'Documentation', 'https://docs.fastlane.tools/actions/match/'
35
- program :help_formatter, :compact
36
+ program :help_formatter, FastlaneCore::HelpFormatter
36
37
 
37
38
  global_option('--verbose') { FastlaneCore::Globals.verbose = true }
38
39
  global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
@@ -3,7 +3,7 @@ module Match
3
3
  class Interface
4
4
  # Call this method to trigger the actual
5
5
  # encryption
6
- def encrypt_files
6
+ def encrypt_files(password: nil)
7
7
  not_implemented(__method__)
8
8
  end
9
9
 
@@ -28,9 +28,9 @@ module Match
28
28
  self.working_directory = working_directory
29
29
  end
30
30
 
31
- def encrypt_files
31
+ def encrypt_files(password: nil)
32
32
  files = []
33
- password = fetch_password!
33
+ password ||= fetch_password!
34
34
  iterate(self.working_directory) do |current|
35
35
  files << current
36
36
  encrypt_specific_file(path: current, password: password)
@@ -22,6 +22,9 @@ module Match
22
22
  git_branch: params[:git_branch],
23
23
  git_full_name: params[:git_full_name],
24
24
  git_user_email: params[:git_user_email],
25
+ git_private_key: params[:git_private_key],
26
+ git_basic_authorization: params[:git_basic_authorization],
27
+ git_bearer_authorization: params[:git_bearer_authorization],
25
28
  clone_branch_directly: params[:clone_branch_directly],
26
29
  type: params[:type].to_s,
27
30
  platform: params[:platform].to_s,
@@ -93,15 +96,17 @@ module Match
93
96
  dest_cert_path = File.join(output_dir_certs, "#{cert_name}.cer")
94
97
  dest_p12_path = File.join(output_dir_certs, "#{p12_name}.p12")
95
98
  else
96
- # Need to get the cert id by comparing base64 encoded cert content with certificate content from the API responses
97
- token = api_token(params)
98
- if token
99
+ if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
99
100
  UI.message("Creating authorization token for App Store Connect API")
100
- Spaceship::ConnectAPI.token = token
101
+ Spaceship::ConnectAPI.token = api_token
102
+ elsif !Spaceship::ConnectAPI.token.nil?
103
+ UI.message("Using existing authorization token for App Store Connect API")
101
104
  else
102
105
  UI.message("Login to App Store Connect (#{params[:username]})")
103
106
  Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name])
104
107
  end
108
+
109
+ # Need to get the cert id by comparing base64 encoded cert content with certificate content from the API responses
105
110
  certs = Spaceship::ConnectAPI::Certificate.all(filter: { certificateType: certificate_type })
106
111
 
107
112
  # Base64 encode contents to find match from API to find a cert ID
@@ -147,11 +152,5 @@ module Match
147
152
  UI.user_error!("#{file_description} does not exist at path: #{file_path}") unless !file_path.nil? || optional
148
153
  file_path
149
154
  end
150
-
151
- def api_token(params)
152
- @api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
153
- @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
154
- return @api_token
155
- end
156
155
  end
157
156
  end
@@ -91,9 +91,8 @@ module Match
91
91
  end
92
92
 
93
93
  def api_token(params)
94
- @api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
95
- @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
96
- return @api_token
94
+ api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path])
95
+ return api_token
97
96
  end
98
97
 
99
98
  def ensure_parameters_are_valid(params)
@@ -21,6 +21,7 @@ module Match
21
21
  end
22
22
 
23
23
  def self.cert_type_sym(type)
24
+ type = type.to_s
24
25
  return :mac_installer_distribution if type == "mac_installer_distribution"
25
26
  return :developer_id_installer if type == "developer_id_installer"
26
27
  return :developer_id_application if type == "developer_id"
@@ -36,6 +36,11 @@ module Match
36
36
  git_branch: params[:git_branch],
37
37
  git_full_name: params[:git_full_name],
38
38
  git_user_email: params[:git_user_email],
39
+
40
+ git_private_key: params[:git_private_key],
41
+ git_basic_authorization: params[:git_basic_authorization],
42
+ git_bearer_authorization: params[:git_bearer_authorization],
43
+
39
44
  clone_branch_directly: params[:clone_branch_directly],
40
45
  google_cloud_bucket_name: params[:google_cloud_bucket_name].to_s,
41
46
  google_cloud_keys_file: params[:google_cloud_keys_file].to_s,
@@ -97,9 +102,11 @@ module Match
97
102
  end
98
103
 
99
104
  def spaceship_login
100
- if api_token
105
+ if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
101
106
  UI.message("Creating authorization token for App Store Connect API")
102
107
  Spaceship::ConnectAPI.token = api_token
108
+ elsif !Spaceship::ConnectAPI.token.nil?
109
+ UI.message("Using existing authorization token for App Store Connect API")
103
110
  else
104
111
  Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name])
105
112
  end
@@ -115,12 +122,6 @@ module Match
115
122
  end
116
123
  end
117
124
 
118
- def api_token
119
- @api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
120
- @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
121
- return @api_token
122
- end
123
-
124
125
  # Collect all the certs/profiles
125
126
  def prepare_list
126
127
  UI.message("Fetching certificates and profiles...")
@@ -246,9 +247,8 @@ module Match
246
247
  UI.success("Successfully deleted certificate")
247
248
  end
248
249
 
249
- if self.files.count > 0
250
- files_to_delete = delete_files!
251
- end
250
+ files_to_delete = delete_files! if self.files.count > 0
251
+ files_to_delete ||= []
252
252
 
253
253
  self.encryption.encrypt_files if self.encryption
254
254
 
@@ -74,7 +74,7 @@ module Match
74
74
 
75
75
  # App Store Connect API
76
76
  FastlaneCore::ConfigItem.new(key: :api_key_path,
77
- env_name: "SIGH_API_KEY_PATH",
77
+ env_names: ["SIGH_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
78
78
  description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
79
79
  optional: true,
80
80
  conflicting_options: [:api_key],
@@ -82,8 +82,8 @@ module Match
82
82
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
83
83
  end),
84
84
  FastlaneCore::ConfigItem.new(key: :api_key,
85
- env_name: "SIGH_API_KEY",
86
- description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
85
+ env_names: ["SIGH_API_KEY", "APP_STORE_CONNECT_API_KEY"],
86
+ description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-hash-option)",
87
87
  type: Hash,
88
88
  optional: true,
89
89
  sensitive: true,
@@ -207,6 +207,7 @@ module Match
207
207
  FastlaneCore::ConfigItem.new(key: :s3_secret_access_key,
208
208
  env_name: "MATCH_S3_SECRET_ACCESS_KEY",
209
209
  description: "S3 secret access key",
210
+ sensitive: true,
210
211
  optional: true),
211
212
  FastlaneCore::ConfigItem.new(key: :s3_bucket,
212
213
  env_name: "MATCH_S3_BUCKET",
@@ -238,7 +239,7 @@ module Match
238
239
  default_value: false),
239
240
  FastlaneCore::ConfigItem.new(key: :force_for_new_devices,
240
241
  env_name: "MATCH_FORCE_FOR_NEW_DEVICES",
241
- description: "Renew the provisioning profiles if the device count on the developer portal has changed. Ignored for profile type 'appstore'",
242
+ description: "Renew the provisioning profiles if the device count on the developer portal has changed. Ignored for profile types 'appstore' and 'developer_id'",
242
243
  type: Boolean,
243
244
  default_value: false),
244
245
  FastlaneCore::ConfigItem.new(key: :skip_confirmation,
@@ -139,9 +139,8 @@ module Match
139
139
  # rubocop:enable Metrics/PerceivedComplexity
140
140
 
141
141
  def api_token(params)
142
- @api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
143
- @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
144
- return @api_token
142
+ api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path])
143
+ return api_token
145
144
  end
146
145
 
147
146
  # Used when creating a new certificate or profile
@@ -192,12 +191,12 @@ module Match
192
191
  UI.verbose("Certificate '#{File.basename(cert_path)}' is already installed on this machine")
193
192
  else
194
193
  Utils.import(cert_path, params[:keychain_name], password: params[:keychain_password])
195
- end
196
194
 
197
- # Import the private key
198
- # there seems to be no good way to check if it's already installed - so just install it
199
- # Key will only be added to the partition list if it isn't already installed
200
- Utils.import(keys.last, params[:keychain_name], password: params[:keychain_password])
195
+ # Import the private key
196
+ # there seems to be no good way to check if it's already installed - so just install it
197
+ # Key will only be added to the partition list if it isn't already installed
198
+ Utils.import(keys.last, params[:keychain_name], password: params[:keychain_password])
199
+ end
201
200
  else
202
201
  UI.message("Skipping installation of certificate as it would not work on this operating system.")
203
202
  end
@@ -244,13 +243,14 @@ module Match
244
243
  force = params[:force]
245
244
 
246
245
  if params[:force_for_new_devices] && !params[:readonly]
247
- if prov_type != :appstore && !params[:force]
246
+ prov_types_without_devices = [:appstore, :developer_id]
247
+ if !prov_types_without_devices.include?(prov_type) && !params[:force]
248
248
  force = device_count_different?(profile: profile, keychain_path: keychain_path, platform: params[:platform].to_sym)
249
249
  else
250
250
  # App Store provisioning profiles don't contain device identifiers and
251
251
  # thus shouldn't be renewed if the device count has changed.
252
- UI.important("Warning: `force_for_new_devices` is set but is ignored for App Store provisioning profiles.")
253
- UI.important("You can safely stop specifying `force_for_new_devices` when running Match for type 'appstore'.")
252
+ UI.important("Warning: `force_for_new_devices` is set but is ignored for App Store & Developer ID provisioning profiles.")
253
+ UI.important("You can safely stop specifying `force_for_new_devices` when running Match for type 'appstore' or 'developer_id'.")
254
254
  end
255
255
  end
256
256
 
@@ -344,7 +344,7 @@ module Match
344
344
  [
345
345
  Spaceship::ConnectAPI::Device::DeviceClass::APPLE_TV
346
346
  ]
347
- when :mac, :catalyst
347
+ when :macos, :catalyst
348
348
  [
349
349
  Spaceship::ConnectAPI::Device::DeviceClass::MAC
350
350
  ]
@@ -13,6 +13,9 @@ module Match
13
13
  UI.message("Creating authorization token for App Store Connect API")
14
14
  Spaceship::ConnectAPI.token = api_token
15
15
  self.team_id = team_id
16
+ elsif !Spaceship::ConnectAPI.token.nil?
17
+ UI.message("Using existing authorization token for App Store Connect API")
18
+ self.team_id = team_id
16
19
  else
17
20
  # We'll try to manually fetch the password
18
21
  # to tell the user that a password is optional
@@ -123,8 +123,8 @@ module Match
123
123
  end
124
124
 
125
125
  def api_token
126
- api_token ||= Spaceship::ConnectAPI::Token.create(self.api_key) if self.api_key
127
- api_token ||= Spaceship::ConnectAPI::Token.from_json_file(self.api_key_path) if self.api_key_path
126
+ api_token = Spaceship::ConnectAPI::Token.from(hash: self.api_key, filepath: self.api_key_path)
127
+ api_token ||= Spaceship::ConnectAPI.token
128
128
  return api_token
129
129
  end
130
130
 
@@ -196,8 +196,8 @@ module Match
196
196
  end
197
197
 
198
198
  def api_token
199
- api_token ||= Spaceship::ConnectAPI::Token.create(self.api_key) if self.api_key
200
- api_token ||= Spaceship::ConnectAPI::Token.from_json_file(self.api_key_path) if self.api_key_path
199
+ api_token = Spaceship::ConnectAPI::Token.from(hash: self.api_key, filepath: self.api_key_path)
200
+ api_token ||= Spaceship::ConnectAPI.token
201
201
  return api_token
202
202
  end
203
203
  end
@@ -2,6 +2,7 @@ require 'commander'
2
2
 
3
3
  require 'fastlane/version'
4
4
  require 'fastlane_core/configuration/configuration'
5
+ require 'fastlane_core/ui/help_formatter'
5
6
  require_relative 'options'
6
7
  require_relative 'manager'
7
8
 
@@ -22,7 +23,7 @@ module PEM
22
23
  program :help, 'Author', 'Felix Krause <pem@krausefx.com>'
23
24
  program :help, 'Website', 'https://fastlane.tools'
24
25
  program :help, 'Documentation', 'https://docs.fastlane.tools/actions/pem/'
25
- program :help_formatter, :compact
26
+ program :help_formatter, FastlaneCore::HelpFormatter
26
27
 
27
28
  global_option('--verbose') { FastlaneCore::Globals.verbose = true }
28
29
  global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
@@ -16,7 +16,7 @@ module Pilot
16
16
  should_login_in_start = options[:apple_id].nil?
17
17
  start(options, should_login: should_login_in_start)
18
18
 
19
- UI.user_error!("No ipa file given") unless config[:ipa]
19
+ UI.user_error!("No ipa or pkg file given") if config[:ipa].nil? && config[:pkg].nil?
20
20
 
21
21
  check_for_changelog_or_whats_new!(options)
22
22
 
@@ -25,16 +25,24 @@ module Pilot
25
25
  dir = Dir.mktmpdir
26
26
 
27
27
  platform = fetch_app_platform
28
- package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(app_id: fetch_app_id,
28
+ if options[:ipa]
29
+ package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(app_id: fetch_app_id,
29
30
  ipa_path: options[:ipa],
30
31
  package_path: dir,
31
32
  platform: platform)
33
+ else
34
+ package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(app_id: fetch_app_id,
35
+ pkg_path: options[:pkg],
36
+ package_path: dir,
37
+ platform: platform)
38
+ end
32
39
 
33
40
  transporter = transporter_for_selected_team(options)
34
- result = transporter.upload(fetch_app_id, package_path)
41
+ result = transporter.upload(package_path: package_path)
35
42
 
36
43
  unless result
37
- UI.user_error!("Error uploading ipa file, for more information see above")
44
+ transporter_errors = transporter.displayable_errors
45
+ UI.user_error!("Error uploading ipa file: \n #{transporter_errors}")
38
46
  end
39
47
 
40
48
  UI.success("Successfully uploaded the new binary to App Store Connect")
@@ -90,8 +98,16 @@ module Pilot
90
98
 
91
99
  def wait_for_build_processing_to_be_complete(return_when_build_appears = false)
92
100
  platform = fetch_app_platform
93
- app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
94
- app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
101
+ if config[:ipa]
102
+ app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
103
+ app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
104
+ elsif config[:pkg]
105
+ app_version = FastlaneCore::PkgFileAnalyser.fetch_app_version(config[:pkg])
106
+ app_build = FastlaneCore::PkgFileAnalyser.fetch_app_build(config[:pkg])
107
+ else
108
+ app_version = config[:app_version]
109
+ app_build = config[:build_number]
110
+ end
95
111
 
96
112
  latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(
97
113
  app_id: app.id,
@@ -99,8 +115,11 @@ module Pilot
99
115
  app_version: app_version,
100
116
  build_version: app_build,
101
117
  poll_interval: config[:wait_processing_interval],
118
+ timeout_duration: config[:wait_processing_timeout_duration],
102
119
  return_when_build_appears: return_when_build_appears,
103
- return_spaceship_testflight_build: false
120
+ return_spaceship_testflight_build: false,
121
+ select_latest: config[:distribute_only],
122
+ wait_for_build_beta_detail_processing: true
104
123
  )
105
124
 
106
125
  unless latest_build.app_version == app_version && latest_build.version == app_build
@@ -248,9 +267,13 @@ module Pilot
248
267
  end
249
268
  end
250
269
 
251
- update_build_beta_details(build, {
252
- auto_notify_enabled: options[:notify_external_testers]
253
- })
270
+ if options[:notify_external_testers].nil?
271
+ UI.important("Using App Store Connect's default for notifying external testers (which is true) - set `notify_external_testers` for full control")
272
+ else
273
+ update_build_beta_details(build, {
274
+ auto_notify_enabled: options[:notify_external_testers]
275
+ })
276
+ end
254
277
  end
255
278
 
256
279
  def self.truncate_changelog(changelog)
@@ -355,6 +378,7 @@ module Pilot
355
378
  # If there are fewer than two teams, don't infer the provider.
356
379
  def transporter_for_selected_team(options)
357
380
  # Use JWT auth
381
+ api_token = Spaceship::ConnectAPI.token
358
382
  unless api_token.nil?
359
383
  api_token.refresh! if api_token.expired?
360
384
  return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text)
@@ -423,14 +447,21 @@ module Pilot
423
447
 
424
448
  UI.important("Export compliance has been set to '#{uses_non_exempt_encryption}'. Need to wait for build to finishing processing again...")
425
449
  UI.important("Set 'ITSAppUsesNonExemptEncryption' in the 'Info.plist' to skip this step and speed up the submission")
426
- return wait_for_build_processing_to_be_complete
450
+
451
+ loop do
452
+ build = Spaceship::ConnectAPI::Build.get(build_id: uploaded_build.id)
453
+ return build unless build.missing_export_compliance?
454
+
455
+ UI.message("Waiting for build #{uploaded_build.id} to process export compliance")
456
+ sleep(5)
457
+ end
427
458
  else
428
459
  return uploaded_build
429
460
  end
430
461
  end
431
462
 
432
463
  def update_review_detail(build, info)
433
- info = info.collect { |k, v| [k.to_sym, v] }.to_h
464
+ info = info.transform_keys(&:to_sym)
434
465
 
435
466
  attributes = {}
436
467
  attributes[:contactEmail] = info[:contact_email] if info.key?(:contact_email)
@@ -446,7 +477,7 @@ module Pilot
446
477
  end
447
478
 
448
479
  def update_localized_app_review(build, info_by_lang, default_info: nil)
449
- info_by_lang = info_by_lang.collect { |k, v| [k.to_sym, v] }.to_h
480
+ info_by_lang = info_by_lang.transform_keys(&:to_sym)
450
481
 
451
482
  if default_info
452
483
  info_by_lang.delete(:default)
@@ -492,7 +523,7 @@ module Pilot
492
523
  end
493
524
 
494
525
  def update_localized_build_review(build, info_by_lang, default_info: nil)
495
- info_by_lang = info_by_lang.collect { |k, v| [k.to_sym, v] }.to_h
526
+ info_by_lang = info_by_lang.transform_keys(&:to_sym)
496
527
 
497
528
  if default_info
498
529
  info_by_lang.delete(:default)
@@ -538,7 +569,6 @@ module Pilot
538
569
  attributes[:autoNotifyEnabled] = info[:auto_notify_enabled] if info.key?(:auto_notify_enabled)
539
570
  build_beta_detail = build.build_beta_detail
540
571
 
541
- # https://github.com/fastlane/fastlane/pull/16006
542
572
  if build_beta_detail
543
573
  Spaceship::ConnectAPI.patch_build_beta_details(build_beta_details_id: build_beta_detail.id, attributes: attributes)
544
574
  else
@@ -1,6 +1,7 @@
1
1
  require "commander"
2
2
 
3
3
  require 'fastlane_core/configuration/configuration'
4
+ require 'fastlane_core/ui/help_formatter'
4
5
  require_relative 'module'
5
6
  require_relative 'tester_importer'
6
7
  require_relative 'tester_exporter'
@@ -51,7 +52,7 @@ module Pilot
51
52
  program :help, "Author", "Felix Krause <pilot@krausefx.com>"
52
53
  program :help, "Website", "https://fastlane.tools"
53
54
  program :help, "Documentation", "https://docs.fastlane.tools/actions/pilot/"
54
- program :help_formatter, :compact
55
+ program :help_formatter, FastlaneCore::HelpFormatter
55
56
 
56
57
  global_option("--verbose") { FastlaneCore::Globals.verbose = true }
57
58
 
@@ -13,28 +13,31 @@ module Pilot
13
13
  def start(options, should_login: true)
14
14
  return if @config # to not login multiple times
15
15
  @config = options
16
- login if should_login
16
+
17
+ # we will always start with App Store Connect API login 'if possible'
18
+ # else fallback to 'should_login' param for 'apple_id' login
19
+ login if options[:api_key_path] || options[:api_key] || should_login
17
20
  end
18
21
 
19
22
  def login
20
- if api_token
23
+ if (api_token = Spaceship::ConnectAPI::Token.from(hash: config[:api_key], filepath: config[:api_key_path]))
21
24
  UI.message("Creating authorization token for App Store Connect API")
22
25
  Spaceship::ConnectAPI.token = api_token
26
+ elsif !Spaceship::ConnectAPI.token.nil?
27
+ UI.message("Using existing authorization token for App Store Connect API")
23
28
  else
24
29
  config[:username] ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
25
30
 
31
+ # Username is now optional since addition of App Store Connect API Key
32
+ # Force asking for username to prompt user if not already set
33
+ config.fetch(:username, force_ask: true)
34
+
26
35
  UI.message("Login to App Store Connect (#{config[:username]})")
27
36
  Spaceship::ConnectAPI.login(config[:username], use_portal: false, use_tunes: true, tunes_team_id: config[:team_id], team_name: config[:team_name])
28
37
  UI.message("Login successful")
29
38
  end
30
39
  end
31
40
 
32
- def api_token
33
- @api_token ||= Spaceship::ConnectAPI::Token.create(config[:api_key]) if config[:api_key]
34
- @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(config[:api_key_path]) if config[:api_key_path]
35
- return @api_token
36
- end
37
-
38
41
  # The app object we're currently using
39
42
  def app
40
43
  @app_id ||= fetch_app_id
@@ -70,7 +73,8 @@ module Pilot
70
73
 
71
74
  def fetch_app_identifier
72
75
  result = config[:app_identifier]
73
- result ||= FastlaneCore::IpaFileAnalyser.fetch_app_identifier(config[:ipa])
76
+ result ||= FastlaneCore::IpaFileAnalyser.fetch_app_identifier(config[:ipa]) if config[:ipa]
77
+ result ||= FastlaneCore::PkgFileAnalyser.fetch_app_identifier(config[:pkg]) if config[:pkg]
74
78
  result ||= UI.input("Please enter the app's bundle identifier: ")
75
79
  UI.verbose("App identifier (#{result})")
76
80
  return result
@@ -79,6 +83,7 @@ module Pilot
79
83
  def fetch_app_platform(required: true)
80
84
  result = config[:app_platform]
81
85
  result ||= FastlaneCore::IpaFileAnalyser.fetch_app_platform(config[:ipa]) if config[:ipa]
86
+ result ||= FastlaneCore::PkgFileAnalyser.fetch_app_platform(config[:pkg]) if config[:pkg]
82
87
  if required
83
88
  result ||= UI.input("Please enter the app's platform (appletvos, ios, osx): ")
84
89
  UI.user_error!("App Platform must be ios, appletvos, or osx") unless ['ios', 'appletvos', 'osx'].include?(result)