fastlane_hotfix 2.165.1 → 2.187.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (415) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +106 -86
  4. data/cert/lib/cert/commands_generator.rb +2 -1
  5. data/cert/lib/cert/options.rb +6 -5
  6. data/cert/lib/cert/runner.rb +8 -8
  7. data/deliver/lib/assets/summary.html.erb +10 -10
  8. data/deliver/lib/deliver/app_screenshot.rb +17 -11
  9. data/deliver/lib/deliver/app_screenshot_validator.rb +108 -0
  10. data/deliver/lib/deliver/commands_generator.rb +4 -3
  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 +123 -21
  16. data/deliver/lib/deliver/module.rb +6 -0
  17. data/deliver/lib/deliver/options.rb +41 -55
  18. data/deliver/lib/deliver/runner.rb +19 -14
  19. data/deliver/lib/deliver/setup.rb +9 -5
  20. data/deliver/lib/deliver/submit_for_review.rb +4 -4
  21. data/deliver/lib/deliver/upload_metadata.rb +32 -21
  22. data/deliver/lib/deliver/upload_price_tier.rb +1 -1
  23. data/deliver/lib/deliver/upload_screenshots.rb +14 -76
  24. data/fastlane/lib/fastlane/actions/actions_helper.rb +3 -3
  25. data/fastlane/lib/fastlane/actions/adb.rb +2 -5
  26. data/fastlane/lib/fastlane/actions/adb_devices.rb +0 -1
  27. data/fastlane/lib/fastlane/actions/add_git_tag.rb +22 -6
  28. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +17 -17
  29. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +21 -7
  30. data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
  31. data/fastlane/lib/fastlane/actions/appetize.rb +13 -8
  32. data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +0 -11
  33. data/fastlane/lib/fastlane/actions/appium.rb +40 -65
  34. data/fastlane/lib/fastlane/actions/appledoc.rb +46 -46
  35. data/fastlane/lib/fastlane/actions/apteligent.rb +3 -2
  36. data/fastlane/lib/fastlane/actions/artifactory.rb +41 -9
  37. data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +7 -13
  38. data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
  39. data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +3 -3
  40. data/fastlane/lib/fastlane/actions/badge.rb +9 -13
  41. data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +11 -5
  42. data/fastlane/lib/fastlane/actions/build_app.rb +7 -1
  43. data/fastlane/lib/fastlane/actions/bundle_install.rb +8 -10
  44. data/fastlane/lib/fastlane/actions/carthage.rb +22 -14
  45. data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +8 -17
  46. data/fastlane/lib/fastlane/actions/chatwork.rb +3 -2
  47. data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +9 -1
  48. data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +0 -1
  49. data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +0 -1
  50. data/fastlane/lib/fastlane/actions/clipboard.rb +3 -6
  51. data/fastlane/lib/fastlane/actions/cloc.rb +9 -13
  52. data/fastlane/lib/fastlane/actions/cocoapods.rb +23 -15
  53. data/fastlane/lib/fastlane/actions/commit_github_file.rb +12 -4
  54. data/fastlane/lib/fastlane/actions/commit_version_bump.rb +6 -7
  55. data/fastlane/lib/fastlane/actions/copy_artifacts.rb +3 -4
  56. data/fastlane/lib/fastlane/actions/crashlytics.rb +7 -11
  57. data/fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb +70 -76
  58. data/fastlane/lib/fastlane/actions/create_keychain.rb +13 -11
  59. data/fastlane/lib/fastlane/actions/create_pull_request.rb +15 -9
  60. data/fastlane/lib/fastlane/actions/create_xcframework.rb +123 -0
  61. data/fastlane/lib/fastlane/actions/danger.rb +13 -12
  62. data/fastlane/lib/fastlane/actions/deploygate.rb +1 -2
  63. data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
  64. data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +27 -28
  65. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +7 -3
  66. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +171 -67
  67. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +20 -3
  68. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +9 -3
  69. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +39 -16
  70. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
  71. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +15 -5
  72. data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +142 -0
  73. data/fastlane/lib/fastlane/actions/download_dsyms.rb +8 -20
  74. data/fastlane/lib/fastlane/actions/dsym_zip.rb +1 -1
  75. data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +2 -6
  76. data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +0 -1
  77. data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +3 -4
  78. data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +3 -5
  79. data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -2
  80. data/fastlane/lib/fastlane/actions/environment_variable.rb +13 -21
  81. data/fastlane/lib/fastlane/actions/erb.rb +2 -5
  82. data/fastlane/lib/fastlane/actions/get_build_number_repository.rb +1 -1
  83. data/fastlane/lib/fastlane/actions/get_certificates.rb +5 -1
  84. data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
  85. data/fastlane/lib/fastlane/actions/get_ipa_info_plist_value.rb +0 -1
  86. data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +32 -35
  87. data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +9 -1
  88. data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
  89. data/fastlane/lib/fastlane/actions/get_version_number.rb +17 -10
  90. data/fastlane/lib/fastlane/actions/git_add.rb +5 -10
  91. data/fastlane/lib/fastlane/actions/git_branch.rb +4 -10
  92. data/fastlane/lib/fastlane/actions/git_commit.rb +12 -10
  93. data/fastlane/lib/fastlane/actions/git_pull.rb +4 -10
  94. data/fastlane/lib/fastlane/actions/git_remote_branch.rb +57 -0
  95. data/fastlane/lib/fastlane/actions/git_submodule_update.rb +16 -8
  96. data/fastlane/lib/fastlane/actions/git_tag_exists.rb +4 -0
  97. data/fastlane/lib/fastlane/actions/github_api.rb +17 -8
  98. data/fastlane/lib/fastlane/actions/gradle.rb +12 -20
  99. data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +1 -1
  100. data/fastlane/lib/fastlane/actions/hg_push.rb +1 -1
  101. data/fastlane/lib/fastlane/actions/hipchat.rb +6 -6
  102. data/fastlane/lib/fastlane/actions/hockey.rb +5 -12
  103. data/fastlane/lib/fastlane/actions/ifttt.rb +3 -6
  104. data/fastlane/lib/fastlane/actions/import_from_git.rb +7 -9
  105. data/fastlane/lib/fastlane/actions/increment_build_number.rb +8 -2
  106. data/fastlane/lib/fastlane/actions/install_on_device.rb +3 -6
  107. data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +4 -0
  108. data/fastlane/lib/fastlane/actions/installr.rb +22 -25
  109. data/fastlane/lib/fastlane/actions/ipa.rb +2 -2
  110. data/fastlane/lib/fastlane/actions/jazzy.rb +11 -8
  111. data/fastlane/lib/fastlane/actions/jira.rb +61 -14
  112. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +6 -6
  113. data/fastlane/lib/fastlane/actions/lcov.rb +0 -4
  114. data/fastlane/lib/fastlane/actions/mailgun.rb +21 -27
  115. data/fastlane/lib/fastlane/actions/make_changelog_from_jenkins.rb +1 -1
  116. data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
  117. data/fastlane/lib/fastlane/actions/modify_services.rb +59 -24
  118. data/fastlane/lib/fastlane/actions/nexus_upload.rb +3 -2
  119. data/fastlane/lib/fastlane/actions/notarize.rb +98 -54
  120. data/fastlane/lib/fastlane/actions/notification.rb +1 -1
  121. data/fastlane/lib/fastlane/actions/number_of_commits.rb +1 -1
  122. data/fastlane/lib/fastlane/actions/oclint.rb +15 -14
  123. data/fastlane/lib/fastlane/actions/onesignal.rb +13 -3
  124. data/fastlane/lib/fastlane/actions/pod_push.rb +9 -2
  125. data/fastlane/lib/fastlane/actions/podio_item.rb +0 -7
  126. data/fastlane/lib/fastlane/actions/prompt.rb +3 -4
  127. data/fastlane/lib/fastlane/actions/push_git_tags.rb +1 -1
  128. data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +14 -3
  129. data/fastlane/lib/fastlane/actions/puts.rb +1 -2
  130. data/fastlane/lib/fastlane/actions/register_device.rb +10 -13
  131. data/fastlane/lib/fastlane/actions/register_devices.rb +11 -14
  132. data/fastlane/lib/fastlane/actions/reset_git_repo.rb +5 -8
  133. data/fastlane/lib/fastlane/actions/reset_simulator_contents.rb +0 -2
  134. data/fastlane/lib/fastlane/actions/resign.rb +2 -9
  135. data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
  136. data/fastlane/lib/fastlane/actions/rsync.rb +3 -6
  137. data/fastlane/lib/fastlane/actions/run_tests.rb +1 -1
  138. data/fastlane/lib/fastlane/actions/s3.rb +1 -1
  139. data/fastlane/lib/fastlane/actions/say.rb +2 -3
  140. data/fastlane/lib/fastlane/actions/scp.rb +4 -10
  141. data/fastlane/lib/fastlane/actions/set_build_number_repository.rb +1 -1
  142. data/fastlane/lib/fastlane/actions/set_changelog.rb +10 -13
  143. data/fastlane/lib/fastlane/actions/set_github_release.rb +23 -16
  144. data/fastlane/lib/fastlane/actions/set_info_plist_value.rb +1 -1
  145. data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -4
  146. data/fastlane/lib/fastlane/actions/setup_ci.rb +1 -2
  147. data/fastlane/lib/fastlane/actions/setup_circle_ci.rb +1 -1
  148. data/fastlane/lib/fastlane/actions/setup_jenkins.rb +7 -12
  149. data/fastlane/lib/fastlane/actions/setup_travis.rb +1 -1
  150. data/fastlane/lib/fastlane/actions/sh.rb +2 -4
  151. data/fastlane/lib/fastlane/actions/slack.rb +164 -145
  152. data/fastlane/lib/fastlane/actions/slather.rb +5 -21
  153. data/fastlane/lib/fastlane/actions/sonar.rb +12 -19
  154. data/fastlane/lib/fastlane/actions/sourcedocs.rb +128 -0
  155. data/fastlane/lib/fastlane/actions/spaceship_logs.rb +1 -1
  156. data/fastlane/lib/fastlane/actions/splunkmint.rb +2 -2
  157. data/fastlane/lib/fastlane/actions/spm.rb +8 -2
  158. data/fastlane/lib/fastlane/actions/ssh.rb +5 -10
  159. data/fastlane/lib/fastlane/actions/swiftlint.rb +21 -19
  160. data/fastlane/lib/fastlane/actions/sync_code_signing.rb +6 -1
  161. data/fastlane/lib/fastlane/actions/testfairy.rb +0 -1
  162. data/fastlane/lib/fastlane/actions/tryouts.rb +2 -3
  163. data/fastlane/lib/fastlane/actions/twitter.rb +0 -5
  164. data/fastlane/lib/fastlane/actions/unlock_keychain.rb +3 -3
  165. data/fastlane/lib/fastlane/actions/update_app_group_identifiers.rb +1 -4
  166. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +8 -15
  167. data/fastlane/lib/fastlane/actions/update_fastlane.rb +31 -10
  168. data/fastlane/lib/fastlane/actions/update_icloud_container_identifiers.rb +1 -4
  169. data/fastlane/lib/fastlane/actions/update_info_plist.rb +1 -1
  170. data/fastlane/lib/fastlane/actions/update_keychain_access_groups.rb +1 -4
  171. data/fastlane/lib/fastlane/actions/update_plist.rb +1 -1
  172. data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +3 -4
  173. data/fastlane/lib/fastlane/actions/update_urban_airship_configuration.rb +0 -1
  174. data/fastlane/lib/fastlane/actions/update_url_schemes.rb +15 -26
  175. data/fastlane/lib/fastlane/actions/upload_app_privacy_details_to_app_store.rb +290 -0
  176. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +8 -7
  177. data/fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb +3 -10
  178. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +8 -4
  179. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +7 -2
  180. data/fastlane/lib/fastlane/actions/validate_play_store_json_key.rb +40 -44
  181. data/fastlane/lib/fastlane/actions/version_get_podspec.rb +1 -2
  182. data/fastlane/lib/fastlane/actions/xcode_install.rb +8 -5
  183. data/fastlane/lib/fastlane/actions/xcode_server_get_assets.rb +3 -3
  184. data/fastlane/lib/fastlane/actions/xcodebuild.rb +5 -5
  185. data/fastlane/lib/fastlane/cli_tools_distributor.rb +6 -3
  186. data/fastlane/lib/fastlane/commands_generator.rb +2 -1
  187. data/fastlane/lib/fastlane/documentation/actions_list.rb +2 -2
  188. data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
  189. data/fastlane/lib/fastlane/documentation/markdown_docs_generator.rb +1 -1
  190. data/fastlane/lib/fastlane/environment_printer.rb +1 -0
  191. data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
  192. data/fastlane/lib/fastlane/fast_file.rb +19 -7
  193. data/fastlane/lib/fastlane/fastlane_require.rb +7 -1
  194. data/fastlane/lib/fastlane/features.rb +1 -1
  195. data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
  196. data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +4 -4
  197. data/fastlane/lib/fastlane/helper/gem_helper.rb +2 -2
  198. data/fastlane/lib/fastlane/helper/git_helper.rb +34 -5
  199. data/fastlane/lib/fastlane/lane_manager.rb +3 -2
  200. data/fastlane/lib/fastlane/notification/slack.rb +56 -0
  201. data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -2
  202. data/fastlane/lib/fastlane/plugins/plugin_info.rb +2 -2
  203. data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -2
  204. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -3
  205. data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +7 -6
  206. data/fastlane/lib/fastlane/plugins/template/.circleci/config.yml +1 -1
  207. data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +1 -1
  208. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +31 -35
  209. data/fastlane/lib/fastlane/plugins/template/spec/spec_helper.rb.erb +1 -1
  210. data/fastlane/lib/fastlane/setup/setup.rb +23 -10
  211. data/fastlane/lib/fastlane/setup/setup_ios.rb +3 -3
  212. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +3 -0
  213. data/fastlane/lib/fastlane/swift_fastlane_function.rb +44 -16
  214. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +2 -0
  215. data/fastlane/lib/fastlane/version.rb +2 -2
  216. data/fastlane/swift/Actions.swift +1 -1
  217. data/fastlane/swift/Appfile.swift +1 -1
  218. data/fastlane/swift/ArgumentProcessor.swift +1 -1
  219. data/fastlane/swift/ControlCommand.swift +1 -1
  220. data/fastlane/swift/Deliverfile.swift +2 -2
  221. data/fastlane/swift/DeliverfileProtocol.swift +23 -23
  222. data/fastlane/swift/Fastfile.swift +1 -1
  223. data/fastlane/swift/Fastlane.swift +7965 -4213
  224. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +4 -0
  225. data/fastlane/swift/Gymfile.swift +2 -2
  226. data/fastlane/swift/GymfileProtocol.swift +15 -3
  227. data/fastlane/swift/LaneFileProtocol.swift +12 -6
  228. data/fastlane/swift/MainProcess.swift +3 -1
  229. data/fastlane/swift/Matchfile.swift +2 -2
  230. data/fastlane/swift/MatchfileProtocol.swift +4 -4
  231. data/fastlane/swift/OptionalConfigValue.swift +101 -0
  232. data/fastlane/swift/Plugins.swift +1 -1
  233. data/fastlane/swift/Precheckfile.swift +2 -2
  234. data/fastlane/swift/PrecheckfileProtocol.swift +8 -4
  235. data/fastlane/swift/RubyCommand.swift +2 -2
  236. data/fastlane/swift/RubyCommandable.swift +1 -1
  237. data/fastlane/swift/Runner.swift +3 -3
  238. data/fastlane/swift/RunnerArgument.swift +1 -1
  239. data/fastlane/swift/Scanfile.swift +2 -2
  240. data/fastlane/swift/ScanfileProtocol.swift +34 -2
  241. data/fastlane/swift/Screengrabfile.swift +2 -2
  242. data/fastlane/swift/ScreengrabfileProtocol.swift +5 -5
  243. data/fastlane/swift/Snapshotfile.swift +2 -2
  244. data/fastlane/swift/SnapshotfileProtocol.swift +19 -3
  245. data/fastlane/swift/SocketClient.swift +4 -3
  246. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  247. data/fastlane/swift/SocketResponse.swift +5 -3
  248. data/fastlane/swift/formatting/Brewfile.lock.json +24 -16
  249. data/fastlane/swift/main.swift +1 -1
  250. data/fastlane/swift/upgrade_manifest.json +1 -1
  251. data/fastlane_core/lib/fastlane_core.rb +22 -20
  252. data/fastlane_core/lib/fastlane_core/build_watcher.rb +89 -12
  253. data/fastlane_core/lib/fastlane_core/cert_checker.rb +12 -7
  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 +78 -14
  261. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +41 -16
  262. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
  263. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +20 -15
  264. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
  265. data/fastlane_core/lib/fastlane_core/languages.rb +2 -2
  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 +48 -28
  269. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +3 -1
  270. data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +4 -4
  271. data/fastlane_core/lib/fastlane_core/swag.rb +1 -1
  272. data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +8 -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/frameit/lib/frameit/commands_generator.rb +2 -1
  279. data/frameit/lib/frameit/config_parser.rb +2 -2
  280. data/frameit/lib/frameit/device_types.rb +7 -1
  281. data/frameit/lib/frameit/frame_downloader.rb +2 -1
  282. data/gym/lib/gym/code_signing_mapping.rb +3 -3
  283. data/gym/lib/gym/commands_generator.rb +2 -1
  284. data/gym/lib/gym/error_handler.rb +8 -0
  285. data/gym/lib/gym/generators/build_command_generator.rb +3 -0
  286. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  287. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +21 -15
  288. data/gym/lib/gym/options.rb +19 -3
  289. data/gym/lib/gym/runner.rb +15 -4
  290. data/match/lib/match/change_password.rb +3 -3
  291. data/match/lib/match/commands_generator.rb +2 -1
  292. data/match/lib/match/encryption/interface.rb +1 -1
  293. data/match/lib/match/encryption/openssl.rb +5 -3
  294. data/match/lib/match/importer.rb +9 -10
  295. data/match/lib/match/migrate.rb +2 -3
  296. data/match/lib/match/module.rb +2 -1
  297. data/match/lib/match/nuke.rb +19 -15
  298. data/match/lib/match/options.rb +4 -3
  299. data/match/lib/match/runner.rb +3 -4
  300. data/match/lib/match/spaceship_ensure.rb +3 -0
  301. data/match/lib/match/storage/git_storage.rb +14 -10
  302. data/match/lib/match/storage/google_cloud_storage.rb +2 -2
  303. data/match/lib/match/storage/s3_storage.rb +2 -2
  304. data/pem/lib/pem/commands_generator.rb +2 -1
  305. data/pilot/lib/pilot.rb +0 -1
  306. data/pilot/lib/pilot/build_manager.rb +41 -15
  307. data/pilot/lib/pilot/commands_generator.rb +2 -1
  308. data/pilot/lib/pilot/manager.rb +11 -8
  309. data/pilot/lib/pilot/options.rb +18 -9
  310. data/pilot/lib/pilot/tester_exporter.rb +0 -1
  311. data/pilot/lib/pilot/tester_manager.rb +0 -1
  312. data/precheck/lib/precheck/commands_generator.rb +2 -1
  313. data/precheck/lib/precheck/options.rb +9 -3
  314. data/precheck/lib/precheck/rule_processor.rb +1 -1
  315. data/precheck/lib/precheck/runner.rb +14 -9
  316. data/produce/lib/produce/commands_generator.rb +101 -28
  317. data/produce/lib/produce/developer_center.rb +42 -4
  318. data/produce/lib/produce/options.rb +1 -1
  319. data/produce/lib/produce/service.rb +270 -179
  320. data/scan/lib/scan/commands_generator.rb +2 -1
  321. data/scan/lib/scan/detect_values.rb +7 -2
  322. data/scan/lib/scan/module.rb +4 -0
  323. data/scan/lib/scan/options.rb +46 -1
  324. data/scan/lib/scan/runner.rb +88 -3
  325. data/scan/lib/scan/slack_poster.rb +4 -1
  326. data/scan/lib/scan/test_command_generator.rb +13 -8
  327. data/screengrab/lib/screengrab/android_environment.rb +5 -53
  328. data/screengrab/lib/screengrab/commands_generator.rb +2 -1
  329. data/screengrab/lib/screengrab/dependency_checker.rb +0 -20
  330. data/screengrab/lib/screengrab/options.rb +5 -2
  331. data/screengrab/lib/screengrab/runner.rb +111 -108
  332. data/sigh/lib/assets/resign.sh +81 -61
  333. data/sigh/lib/sigh/commands_generator.rb +2 -1
  334. data/sigh/lib/sigh/download_all.rb +4 -8
  335. data/sigh/lib/sigh/options.rb +3 -2
  336. data/sigh/lib/sigh/runner.rb +9 -9
  337. data/snapshot/lib/assets/SnapfileTemplate +3 -2
  338. data/snapshot/lib/assets/SnapfileTemplate.swift +2 -1
  339. data/snapshot/lib/assets/SnapshotHelper.swift +20 -12
  340. data/snapshot/lib/snapshot/commands_generator.rb +3 -1
  341. data/snapshot/lib/snapshot/options.rb +22 -2
  342. data/snapshot/lib/snapshot/reports_generator.rb +7 -1
  343. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  344. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +1 -1
  345. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +10 -5
  346. data/snapshot/lib/snapshot/test_command_generator.rb +18 -4
  347. data/snapshot/lib/snapshot/test_command_generator_base.rb +3 -1
  348. data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +1 -1
  349. data/snapshot/lib/snapshot/update.rb +1 -1
  350. data/spaceship/README.md +4 -14
  351. data/spaceship/lib/spaceship/base.rb +2 -2
  352. data/spaceship/lib/spaceship/client.rb +47 -29
  353. data/spaceship/lib/spaceship/commands_generator.rb +4 -2
  354. data/spaceship/lib/spaceship/connect_api.rb +6 -0
  355. data/spaceship/lib/spaceship/connect_api/api_client.rb +67 -9
  356. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  357. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +39 -6
  358. data/spaceship/lib/spaceship/connect_api/models/app.rb +95 -55
  359. data/spaceship/lib/spaceship/connect_api/models/app_data_usage.rb +59 -0
  360. data/spaceship/lib/spaceship/connect_api/models/app_data_usage_category.rb +65 -0
  361. data/spaceship/lib/spaceship/connect_api/models/app_data_usage_data_protection.rb +27 -0
  362. data/spaceship/lib/spaceship/connect_api/models/app_data_usage_grouping.rb +18 -0
  363. data/spaceship/lib/spaceship/connect_api/models/app_data_usage_purposes.rb +37 -0
  364. data/spaceship/lib/spaceship/connect_api/models/app_data_usages_publish_state.rb +36 -0
  365. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +26 -10
  366. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +8 -4
  367. data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +15 -11
  368. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +18 -9
  369. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +10 -8
  370. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +20 -11
  371. data/spaceship/lib/spaceship/connect_api/models/app_store_review_attachment.rb +7 -5
  372. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +6 -4
  373. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +62 -38
  374. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +27 -14
  375. data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +3 -2
  376. data/spaceship/lib/spaceship/connect_api/models/beta_app_review_submission.rb +3 -2
  377. data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +6 -4
  378. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +29 -3
  379. data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +15 -9
  380. data/spaceship/lib/spaceship/connect_api/models/build.rb +34 -17
  381. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
  382. data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +3 -2
  383. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +41 -6
  384. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +86 -21
  385. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +12 -8
  386. data/spaceship/lib/spaceship/connect_api/models/device.rb +36 -4
  387. data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +6 -4
  388. data/spaceship/lib/spaceship/connect_api/models/profile.rb +18 -8
  389. data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +3 -2
  390. data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +9 -6
  391. data/spaceship/lib/spaceship/connect_api/models/territory.rb +3 -2
  392. data/spaceship/lib/spaceship/connect_api/models/user.rb +6 -4
  393. data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +22 -6
  394. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +99 -2
  395. data/spaceship/lib/spaceship/connect_api/response.rb +3 -1
  396. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +50 -0
  397. data/spaceship/lib/spaceship/connect_api/token.rb +15 -3
  398. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +122 -2
  399. data/spaceship/lib/spaceship/errors.rb +19 -0
  400. data/spaceship/lib/spaceship/playground.rb +2 -2
  401. data/spaceship/lib/spaceship/spaceauth_runner.rb +38 -15
  402. data/spaceship/lib/spaceship/tunes/iap_detail.rb +1 -1
  403. data/spaceship/lib/spaceship/tunes/members.rb +1 -1
  404. data/spaceship/lib/spaceship/tunes/tunes_client.rb +4 -4
  405. data/spaceship/lib/spaceship/two_step_or_factor_client.rb +59 -33
  406. data/spaceship/lib/spaceship/ui.rb +2 -2
  407. data/spaceship/lib/spaceship/upgrade_2fa_later_client.rb +91 -0
  408. data/supply/lib/supply.rb +1 -1
  409. data/supply/lib/supply/client.rb +5 -3
  410. data/supply/lib/supply/commands_generator.rb +2 -1
  411. data/supply/lib/supply/options.rb +3 -3
  412. data/supply/lib/supply/uploader.rb +6 -4
  413. metadata +125 -93
  414. data/pilot/lib/pilot/features.rb +0 -0
  415. data/pilot/lib/pilot/tester_util.rb +0 -0
@@ -4,6 +4,12 @@ require 'fastlane/boolean'
4
4
 
5
5
  module Deliver
6
6
  class << self
7
+ attr_accessor :cache
8
+
9
+ def cache
10
+ @cache ||= {}
11
+ @cache
12
+ end
7
13
  end
8
14
 
9
15
  Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
@@ -13,7 +13,7 @@ module Deliver
13
13
 
14
14
  [
15
15
  FastlaneCore::ConfigItem.new(key: :api_key_path,
16
- env_name: "DELIVER_API_KEY_PATH",
16
+ env_names: ["DELIVER_API_KEY_PATH", "APP_STORE_CONNECT_API_KEY_PATH"],
17
17
  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)",
18
18
  optional: true,
19
19
  conflicting_options: [:api_key],
@@ -21,7 +21,7 @@ module Deliver
21
21
  UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
22
22
  end),
23
23
  FastlaneCore::ConfigItem.new(key: :api_key,
24
- env_name: "DELIVER_API_KEY",
24
+ env_names: ["DELIVER_API_KEY", "APP_STORE_CONNECT_API_KEY"],
25
25
  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)",
26
26
  type: Hash,
27
27
  optional: true,
@@ -32,6 +32,7 @@ module Deliver
32
32
  short_option: "-u",
33
33
  env_name: "DELIVER_USERNAME",
34
34
  description: "Your Apple ID Username",
35
+ optional: true,
35
36
  default_value: user,
36
37
  default_value_dynamic: true),
37
38
  FastlaneCore::ConfigItem.new(key: :app_identifier,
@@ -108,11 +109,11 @@ module Deliver
108
109
  default_value: false,
109
110
  env_name: "DELIVER_EDIT_LIVE",
110
111
  description: "Modify live metadata, this option disables ipa upload and screenshot upload",
111
- is_string: false),
112
+ type: Boolean),
112
113
  FastlaneCore::ConfigItem.new(key: :use_live_version,
113
114
  env_name: "DELIVER_USE_LIVE_VERSION",
114
115
  description: "Force usage of live version rather than edit version",
115
- is_string: false,
116
+ type: Boolean,
116
117
  default_value: false),
117
118
 
118
119
  # paths
@@ -131,22 +132,22 @@ module Deliver
131
132
  FastlaneCore::ConfigItem.new(key: :skip_binary_upload,
132
133
  env_name: "DELIVER_SKIP_BINARY_UPLOAD",
133
134
  description: "Skip uploading an ipa or pkg to App Store Connect",
134
- is_string: false,
135
+ type: Boolean,
135
136
  default_value: false),
136
137
  FastlaneCore::ConfigItem.new(key: :skip_screenshots,
137
138
  env_name: "DELIVER_SKIP_SCREENSHOTS",
138
139
  description: "Don't upload the screenshots",
139
- is_string: false,
140
+ type: Boolean,
140
141
  default_value: false),
141
142
  FastlaneCore::ConfigItem.new(key: :skip_metadata,
142
143
  env_name: "DELIVER_SKIP_METADATA",
143
144
  description: "Don't upload the metadata (e.g. title, description). This will still upload screenshots",
144
- is_string: false,
145
+ type: Boolean,
145
146
  default_value: false),
146
147
  FastlaneCore::ConfigItem.new(key: :skip_app_version_update,
147
148
  env_name: "DELIVER_SKIP_APP_VERSION_UPDATE",
148
149
  description: "Don’t create or update the app version that is being prepared for submission",
149
- is_string: false,
150
+ type: Boolean,
150
151
  default_value: false),
151
152
 
152
153
  # how to operate
@@ -154,22 +155,22 @@ module Deliver
154
155
  short_option: "-f",
155
156
  env_name: "DELIVER_FORCE",
156
157
  description: "Skip verification of HTML preview file",
157
- is_string: false,
158
+ type: Boolean,
158
159
  default_value: false),
159
160
  FastlaneCore::ConfigItem.new(key: :overwrite_screenshots,
160
161
  env_name: "DELIVER_OVERWRITE_SCREENSHOTS",
161
162
  description: "Clear all previously uploaded screenshots before uploading the new ones",
162
- is_string: false,
163
+ type: Boolean,
163
164
  default_value: false),
164
165
  FastlaneCore::ConfigItem.new(key: :submit_for_review,
165
166
  env_name: "DELIVER_SUBMIT_FOR_REVIEW",
166
167
  description: "Submit the new version for Review after uploading everything",
167
- is_string: false,
168
+ type: Boolean,
168
169
  default_value: false),
169
170
  FastlaneCore::ConfigItem.new(key: :reject_if_possible,
170
171
  env_name: "DELIVER_REJECT_IF_POSSIBLE",
171
172
  description: "Rejects the previously submitted build if it's in a state where it's possible",
172
- is_string: false,
173
+ type: Boolean,
173
174
  default_value: false),
174
175
 
175
176
  # release
@@ -197,13 +198,13 @@ module Deliver
197
198
  env_name: "DELIVER_PHASED_RELEASE",
198
199
  description: "Enable the phased release feature of iTC",
199
200
  optional: true,
200
- is_string: false,
201
+ type: Boolean,
201
202
  default_value: false),
202
203
  FastlaneCore::ConfigItem.new(key: :reset_ratings,
203
204
  env_name: "DELIVER_RESET_RATINGS",
204
205
  description: "Reset the summary rating when you release a new version of the application",
205
206
  optional: true,
206
- is_string: false,
207
+ type: Boolean,
207
208
  default_value: false),
208
209
 
209
210
  # other app configuration
@@ -211,13 +212,12 @@ module Deliver
211
212
  short_option: "-r",
212
213
  env_name: "DELIVER_PRICE_TIER",
213
214
  description: "The price tier of this application",
214
- is_string: false,
215
+ type: Integer,
215
216
  optional: true),
216
217
  FastlaneCore::ConfigItem.new(key: :app_rating_config_path,
217
218
  short_option: "-g",
218
219
  env_name: "DELIVER_APP_RATING_CONFIG_PATH",
219
220
  description: "Path to the app rating's config",
220
- is_string: true,
221
221
  optional: true,
222
222
  verify_block: proc do |value|
223
223
  UI.user_error!("Could not find config file at path '#{File.expand_path(value)}'") unless File.exist?(value)
@@ -226,7 +226,6 @@ module Deliver
226
226
  FastlaneCore::ConfigItem.new(key: :submission_information,
227
227
  short_option: "-b",
228
228
  description: "Extra information for the submission (e.g. compliance specifications, IDFA settings)",
229
- is_string: false,
230
229
  type: Hash,
231
230
  optional: true),
232
231
 
@@ -236,7 +235,7 @@ module Deliver
236
235
  env_name: "DELIVER_TEAM_ID",
237
236
  description: "The ID of your App Store Connect team if you're in multiple teams",
238
237
  optional: true,
239
- is_string: false, # as we also allow integers, which we convert to strings anyway
238
+ skip_type_validation: true, # as we also allow integers, which we convert to strings anyway
240
239
  code_gen_sensitive: true,
241
240
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
242
241
  default_value_dynamic: true,
@@ -259,7 +258,6 @@ module Deliver
259
258
  env_name: "DELIVER_DEV_PORTAL_TEAM_ID",
260
259
  description: "The short ID of your Developer Portal team, if you're in multiple teams. Different from your iTC team ID!",
261
260
  optional: true,
262
- is_string: true,
263
261
  code_gen_sensitive: true,
264
262
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id),
265
263
  default_value_dynamic: true,
@@ -277,7 +275,7 @@ module Deliver
277
275
  verify_block: proc do |value|
278
276
  ENV["FASTLANE_TEAM_NAME"] = value.to_s
279
277
  end),
280
- # rubocop:disable Metrics/LineLength
278
+ # rubocop:disable Layout/LineLength
281
279
  FastlaneCore::ConfigItem.new(key: :itc_provider,
282
280
  env_name: "DELIVER_ITC_PROVIDER",
283
281
  description: "The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column",
@@ -285,20 +283,20 @@ module Deliver
285
283
  code_gen_sensitive: true,
286
284
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_provider),
287
285
  default_value_dynamic: true),
288
- # rubocop:enable Metrics/LineLength
286
+ # rubocop:enable Layout/LineLength
289
287
 
290
288
  # precheck
291
289
  FastlaneCore::ConfigItem.new(key: :run_precheck_before_submit,
292
290
  short_option: "-x",
293
291
  env_name: "DELIVER_RUN_PRECHECK_BEFORE_SUBMIT",
294
292
  description: "Run precheck before submitting to app review",
295
- is_string: false,
293
+ type: Boolean,
296
294
  default_value: true),
297
295
  FastlaneCore::ConfigItem.new(key: :precheck_default_rule_level,
298
296
  short_option: "-d",
299
297
  env_name: "DELIVER_PRECHECK_DEFAULT_RULE_LEVEL",
300
298
  description: "The default precheck rule level unless otherwise configured",
301
- is_string: false,
299
+ type: Symbol,
302
300
  default_value: :warn),
303
301
 
304
302
  # App Metadata
@@ -306,7 +304,6 @@ module Deliver
306
304
  env_name: "DELIVER_INDIVUDAL_METADATA_ITEMS",
307
305
  description: "An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow",
308
306
  deprecated: "Removed after the migration to the new App Store Connect API in June 2020",
309
- is_string: false,
310
307
  type: Array,
311
308
  optional: true),
312
309
 
@@ -326,66 +323,56 @@ module Deliver
326
323
  FastlaneCore::ConfigItem.new(key: :copyright,
327
324
  env_name: "DELIVER_COPYRIGHT",
328
325
  description: "Metadata: The copyright notice",
329
- optional: true,
330
- is_string: true),
326
+ optional: true),
331
327
  FastlaneCore::ConfigItem.new(key: :primary_category,
332
328
  env_name: "DELIVER_PRIMARY_CATEGORY",
333
329
  description: "Metadata: The english name of the primary category (e.g. `Business`, `Books`)",
334
- optional: true,
335
- is_string: true),
330
+ optional: true),
336
331
  FastlaneCore::ConfigItem.new(key: :secondary_category,
337
332
  env_name: "DELIVER_SECONDARY_CATEGORY",
338
333
  description: "Metadata: The english name of the secondary category (e.g. `Business`, `Books`)",
339
- optional: true,
340
- is_string: true),
334
+ optional: true),
341
335
  FastlaneCore::ConfigItem.new(key: :primary_first_sub_category,
342
336
  env_name: "DELIVER_PRIMARY_FIRST_SUB_CATEGORY",
343
337
  description: "Metadata: The english name of the primary first sub category (e.g. `Educational`, `Puzzle`)",
344
- optional: true,
345
- is_string: true),
338
+ optional: true),
346
339
  FastlaneCore::ConfigItem.new(key: :primary_second_sub_category,
347
340
  env_name: "DELIVER_PRIMARY_SECOND_SUB_CATEGORY",
348
341
  description: "Metadata: The english name of the primary second sub category (e.g. `Educational`, `Puzzle`)",
349
- optional: true,
350
- is_string: true),
342
+ optional: true),
351
343
  FastlaneCore::ConfigItem.new(key: :secondary_first_sub_category,
352
344
  env_name: "DELIVER_SECONDARY_FIRST_SUB_CATEGORY",
353
345
  description: "Metadata: The english name of the secondary first sub category (e.g. `Educational`, `Puzzle`)",
354
- optional: true,
355
- is_string: true),
346
+ optional: true),
356
347
  FastlaneCore::ConfigItem.new(key: :secondary_second_sub_category,
357
348
  env_name: "DELIVER_SECONDARY_SECOND_SUB_CATEGORY",
358
349
  description: "Metadata: The english name of the secondary second sub category (e.g. `Educational`, `Puzzle`)",
359
- optional: true,
360
- is_string: true),
350
+ optional: true),
361
351
  FastlaneCore::ConfigItem.new(key: :trade_representative_contact_information,
362
352
  description: "Metadata: A hash containing the trade representative contact information",
363
353
  optional: true,
364
- is_string: false,
354
+ deprecated: "This is no longer used by App Store Connect",
365
355
  type: Hash),
366
356
  FastlaneCore::ConfigItem.new(key: :app_review_information,
367
357
  description: "Metadata: A hash containing the review information",
368
358
  optional: true,
369
- is_string: false,
370
359
  type: Hash),
371
360
  FastlaneCore::ConfigItem.new(key: :app_review_attachment_file,
372
361
  env_name: "DELIVER_APP_REVIEW_ATTACHMENT_FILE",
373
362
  description: "Metadata: Path to the app review attachment file",
374
- optional: true,
375
- is_string: true),
363
+ optional: true),
376
364
  # Localised
377
365
  FastlaneCore::ConfigItem.new(key: :description,
378
366
  description: "Metadata: The localised app description",
379
367
  optional: true,
380
- is_string: false),
368
+ type: Hash),
381
369
  FastlaneCore::ConfigItem.new(key: :name,
382
370
  description: "Metadata: The localised app name",
383
371
  optional: true,
384
- is_string: false),
372
+ type: Hash),
385
373
  FastlaneCore::ConfigItem.new(key: :subtitle,
386
374
  description: "Metadata: The localised app subtitle",
387
375
  optional: true,
388
- is_string: false,
389
376
  type: Hash,
390
377
  verify_block: proc do |value|
391
378
  UI.user_error!(":subtitle must be a hash, with the language being the key") unless value.kind_of?(Hash)
@@ -393,7 +380,6 @@ module Deliver
393
380
  FastlaneCore::ConfigItem.new(key: :keywords,
394
381
  description: "Metadata: An array of localised keywords",
395
382
  optional: true,
396
- is_string: false,
397
383
  type: Hash,
398
384
  verify_block: proc do |value|
399
385
  UI.user_error!(":keywords must be a hash, with the language being the key") unless value.kind_of?(Hash)
@@ -408,7 +394,6 @@ module Deliver
408
394
  FastlaneCore::ConfigItem.new(key: :promotional_text,
409
395
  description: "Metadata: An array of localised promotional texts",
410
396
  optional: true,
411
- is_string: false,
412
397
  type: Hash,
413
398
  verify_block: proc do |value|
414
399
  UI.user_error!(":keywords must be a hash, with the language being the key") unless value.kind_of?(Hash)
@@ -416,23 +401,23 @@ module Deliver
416
401
  FastlaneCore::ConfigItem.new(key: :release_notes,
417
402
  description: "Metadata: Localised release notes for this version",
418
403
  optional: true,
419
- is_string: false),
404
+ type: Hash),
420
405
  FastlaneCore::ConfigItem.new(key: :privacy_url,
421
406
  description: "Metadata: Localised privacy url",
422
407
  optional: true,
423
- is_string: false),
408
+ type: Hash),
424
409
  FastlaneCore::ConfigItem.new(key: :apple_tv_privacy_policy,
425
410
  description: "Metadata: Localised Apple TV privacy policy text",
426
411
  optional: true,
427
- is_string: false),
412
+ type: Hash),
428
413
  FastlaneCore::ConfigItem.new(key: :support_url,
429
414
  description: "Metadata: Localised support url",
430
415
  optional: true,
431
- is_string: false),
416
+ type: Hash),
432
417
  FastlaneCore::ConfigItem.new(key: :marketing_url,
433
418
  description: "Metadata: Localised marketing url",
434
419
  optional: true,
435
- is_string: false),
420
+ type: Hash),
436
421
  # The verify_block has been removed from here and verification now happens in Deliver::DetectValues
437
422
  # Verification needed Spaceship::Tunes.client which required the Deliver::Runner to already by started
438
423
  FastlaneCore::ConfigItem.new(key: :languages,
@@ -444,11 +429,11 @@ module Deliver
444
429
  env_name: "DELIVER_IGNORE_LANGUAGE_DIRECTORY_VALIDATION",
445
430
  description: "Ignore errors when invalid languages are found in metadata and screenshot directories",
446
431
  default_value: false,
447
- is_string: false),
432
+ type: Boolean),
448
433
  FastlaneCore::ConfigItem.new(key: :precheck_include_in_app_purchases,
449
434
  env_name: "PRECHECK_INCLUDE_IN_APP_PURCHASES",
450
435
  description: "Should precheck check in-app purchases?",
451
- is_string: false,
436
+ type: Boolean,
452
437
  optional: true,
453
438
  default_value: true),
454
439
 
@@ -457,7 +442,8 @@ module Deliver
457
442
  short_option: "-p",
458
443
  env_name: "DELIVER_APP_ID",
459
444
  description: "The (spaceship) app ID of the app you want to use/modify",
460
- is_string: false) # don't add any verification here, as it's used to store a spaceship ref
445
+ optional: true,
446
+ type: Integer)
461
447
  ]
462
448
  end
463
449
  end
@@ -26,10 +26,16 @@ module Deliver
26
26
  end
27
27
 
28
28
  def login
29
- if api_token
29
+ if (api_token = Spaceship::ConnectAPI::Token.from(hash: options[:api_key], filepath: options[:api_key_path]))
30
30
  UI.message("Creating authorization token for App Store Connect API")
31
31
  Spaceship::ConnectAPI.token = api_token
32
+ elsif !Spaceship::ConnectAPI.token.nil?
33
+ UI.message("Using existing authorization token for App Store Connect API")
32
34
  else
35
+ # Username is now optional since addition of App Store Connect API Key
36
+ # Force asking for username to prompt user if not already set
37
+ options.fetch(:username, force_ask: true)
38
+
33
39
  # Team selection passed though FASTLANE_TEAM_ID and FASTLANE_TEAM_NAME environment variables
34
40
  # Prompts select team if multiple teams and none specified
35
41
  UI.message("Login to App Store Connect (#{options[:username]})")
@@ -38,12 +44,6 @@ module Deliver
38
44
  end
39
45
  end
40
46
 
41
- def api_token
42
- @api_token ||= Spaceship::ConnectAPI::Token.create(options[:api_key]) if options[:api_key]
43
- @api_token ||= Spaceship::ConnectAPI::Token.from_json_file(options[:api_key_path]) if options[:api_key_path]
44
- return @api_token
45
- end
46
-
47
47
  def run
48
48
  verify_version if options[:app_version].to_s.length > 0 && !options[:skip_app_version_update]
49
49
 
@@ -83,7 +83,7 @@ module Deliver
83
83
 
84
84
  if options[:api_key] || options[:api_key_path]
85
85
  if options[:precheck_include_in_app_purchases]
86
- UI.user_error!("Precheck cannot check In-app purchases with the App Store Connect API Key (yet). Exclude In-app purchases from precheck or use Apple ID login")
86
+ UI.user_error!("Precheck cannot check In-app purchases with the App Store Connect API Key (yet). Exclude In-app purchases from precheck, disable the precheck step in your build step, or use Apple ID login")
87
87
  end
88
88
 
89
89
  precheck_options[:api_key] = options[:api_key]
@@ -114,7 +114,7 @@ module Deliver
114
114
  app_version = options[:app_version]
115
115
  UI.message("Making sure the latest version on App Store Connect matches '#{app_version}'...")
116
116
 
117
- app = options[:app]
117
+ app = Deliver.cache[:app]
118
118
 
119
119
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
120
120
  changed = app.ensure_version!(app_version, platform: platform)
@@ -163,14 +163,14 @@ module Deliver
163
163
 
164
164
  if upload_ipa
165
165
  package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
166
- app_id: options[:app].id,
166
+ app_id: Deliver.cache[:app].id,
167
167
  ipa_path: options[:ipa],
168
168
  package_path: "/tmp",
169
169
  platform: options[:platform]
170
170
  )
171
171
  elsif upload_pkg
172
172
  package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
173
- app_id: options[:app].id,
173
+ app_id: Deliver.cache[:app].id,
174
174
  pkg_path: options[:pkg],
175
175
  package_path: "/tmp",
176
176
  platform: options[:platform]
@@ -178,12 +178,16 @@ module Deliver
178
178
  end
179
179
 
180
180
  transporter = transporter_for_selected_team
181
- result = transporter.upload(options[:app].id, package_path)
182
- UI.user_error!("Could not upload binary to App Store Connect. Check out the error above", show_github_issues: true) unless result
181
+ result = transporter.upload(package_path: package_path)
182
+
183
+ unless result
184
+ transporter_errors = transporter.displayable_errors
185
+ UI.user_error!("Error uploading ipa file: \n #{transporter_errors}")
186
+ end
183
187
  end
184
188
 
185
189
  def reject_version_if_possible
186
- app = options[:app]
190
+ app = Deliver.cache[:app]
187
191
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
188
192
  if app.reject_version_if_possible!(platform: platform)
189
193
  UI.success("Successfully rejected previous version!")
@@ -202,6 +206,7 @@ module Deliver
202
206
  # If there are fewer than two teams, don't infer the provider.
203
207
  def transporter_for_selected_team
204
208
  # Use JWT auth
209
+ api_token = Spaceship::ConnectAPI.token
205
210
  unless api_token.nil?
206
211
  api_token.refresh! if api_token.expired?
207
212
  return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text)
@@ -1,4 +1,3 @@
1
- require 'open-uri'
2
1
  require 'spaceship/tunes/tunes'
3
2
 
4
3
  require_relative 'module'
@@ -40,13 +39,13 @@ module Deliver
40
39
  # This method takes care of creating a new 'deliver' folder, containing the app metadata
41
40
  # and screenshots folders
42
41
  def generate_deliver_file(deliver_path, options)
43
- app = options[:app]
42
+ app = Deliver.cache[:app]
44
43
 
45
44
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
46
45
  v = app.get_latest_app_store_version(platform: platform)
47
46
 
48
47
  metadata_path = options[:metadata_path] || File.join(deliver_path, 'metadata')
49
- generate_metadata_files(app, v, metadata_path)
48
+ generate_metadata_files(app, v, metadata_path, options)
50
49
 
51
50
  # Generate the final Deliverfile here
52
51
  return File.read(deliverfile_path)
@@ -60,9 +59,14 @@ module Deliver
60
59
  end
61
60
  end
62
61
 
63
- def generate_metadata_files(app, version, path)
62
+ def generate_metadata_files(app, version, path, options)
64
63
  # App info localizations
65
- app_info = app.fetch_live_app_info || app.fetch_edit_app_info
64
+ if options[:use_live_version]
65
+ app_info = app.fetch_live_app_info
66
+ UI.user_error!("The option `use_live_version` was set to `true`, however no live app was found on App Store Connect.") unless app_info
67
+ else
68
+ app_info = app.fetch_edit_app_info || app.fetch_live_app_info
69
+ end
66
70
  app_info_localizations = app_info.get_app_info_localizations
67
71
  app_info_localizations.each do |localization|
68
72
  language = localization.locale