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
@@ -69,7 +69,7 @@ module FastlaneCore
69
69
  end
70
70
 
71
71
  def command_output(message)
72
- actual = (message.split("\r").last || "") # as clearing the line will remove the `>` and the time stamp
72
+ actual = (encode_as_utf_8_if_possible(message).split("\r").last || "") # as clearing the line will remove the `>` and the time stamp
73
73
  actual.split("\n").each do |msg|
74
74
  if FastlaneCore::Env.truthy?("FASTLANE_DISABLE_OUTPUT_FORMAT")
75
75
  log.info(msg)
@@ -145,11 +145,25 @@ module FastlaneCore
145
145
  def password(message)
146
146
  verify_interactive!(message)
147
147
 
148
- ask("#{format_string}#{message.to_s.yellow}") { |q| q.echo = "*" }
148
+ ask("#{format_string}#{message.to_s.yellow}") do |q|
149
+ q.whitespace = :chomp
150
+ q.echo = "*"
151
+ end
149
152
  end
150
153
 
151
154
  private
152
155
 
156
+ def encode_as_utf_8_if_possible(message)
157
+ return message if message.valid_encoding?
158
+
159
+ # genstrings outputs UTF-16, so we should try to use this encoding if it turns out to be valid
160
+ test_message = message.dup
161
+ return message.encode(Encoding::UTF_8, Encoding::UTF_16) if test_message.force_encoding(Encoding::UTF_16).valid_encoding?
162
+
163
+ # replace any invalid with empty string
164
+ message.encode(Encoding::UTF_8, invalid: :replace)
165
+ end
166
+
153
167
  def verify_interactive!(message)
154
168
  return if interactive?
155
169
  important(message)
@@ -138,7 +138,7 @@ module FastlaneCore
138
138
  # Basically this should be used when you actively catch the error
139
139
  # and want to show a nice error message to the user
140
140
  def user_error!(error_message, options = {})
141
- raise FastlaneError.new(options), error_message.to_s
141
+ raise FastlaneError.new(show_github_issues: options[:show_github_issues], error_info: options[:error_info]), error_message.to_s
142
142
  end
143
143
 
144
144
  # Use this method to exit the program because of a shell command
@@ -63,7 +63,7 @@ module FastlaneCore
63
63
  if !Helper.bundler? && !Helper.contained_fastlane? && Random.rand(5) == 1
64
64
  # We want to show this message from time to time, if the user doesn't use bundler, nor bundled fastlane
65
65
  puts('#######################################################################')
66
- puts("# Run `sudo gem cleanup` from time to time to speed up fastlane")
66
+ puts("# Run `gem cleanup` from time to time to speed up fastlane")
67
67
  end
68
68
  puts('#######################################################################')
69
69
  Changelog.show_changes(gem_name, current_version, update_gem_command: UpdateChecker.update_command(gem_name: gem_name)) unless FastlaneCore::Env.truthy?("FASTLANE_HIDE_CHANGELOG")
@@ -80,7 +80,7 @@ module FastlaneCore
80
80
  elsif Helper.mac_app?
81
81
  "the Fabric app. Launch the app and navigate to the fastlane tab to get the most recent version."
82
82
  else
83
- "sudo gem install #{gem_name.downcase}"
83
+ "gem install #{gem_name.downcase}"
84
84
  end
85
85
  end
86
86
 
@@ -1,5 +1,6 @@
1
1
  require 'commander'
2
2
  require 'fastlane/version'
3
+ require 'fastlane_core/ui/help_formatter'
3
4
  require 'fastlane_core/globals'
4
5
  require 'fastlane_core/configuration/configuration'
5
6
 
@@ -27,7 +28,7 @@ module Frameit
27
28
  program :help, 'Author', 'Felix Krause <frameit@krausefx.com>'
28
29
  program :help, 'Website', 'https://fastlane.tools'
29
30
  program :help, 'Documentation', 'https://docs.fastlane.tools/actions/frameit/'
30
- program :help_formatter, :compact
31
+ program :help_formatter, FastlaneCore::HelpFormatter
31
32
 
32
33
  global_option('--verbose') { FastlaneCore::Globals.verbose = true }
33
34
  global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
@@ -121,12 +121,12 @@ module Frameit
121
121
 
122
122
  def self.supported_color?(value)
123
123
  return false if value.nil?
124
- Color.all_colors.any? { |c| c == value }
124
+ Color.all_colors.any?(value)
125
125
  end
126
126
 
127
127
  def self.supported_platform?(value)
128
128
  return false if value.nil?
129
- Platform.all_platforms.any? { |c| c == value }
129
+ Platform.all_platforms.any?(value)
130
130
  end
131
131
 
132
132
  def self.supported_device?(value)
@@ -45,6 +45,8 @@ module Frameit
45
45
  GREEN ||= "Green"
46
46
  PINK ||= "Pink"
47
47
  PURPLE ||= "Purple"
48
+ GRAPHITE ||= "Graphite"
49
+ PACIFIC_BLUE ||= "Pacific Blue"
48
50
 
49
51
  def self.all_colors
50
52
  Color.constants.map { |c| Color.const_get(c).upcase.gsub(' ', '_') }
@@ -110,7 +112,7 @@ module Frameit
110
112
  IPHONE_7 ||= Frameit::Device.new("iphone-7", "Apple iPhone 7", 5, [[750, 1334], [1334, 750]], 326, Color::MATTE_BLACK, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_47, :use_legacy_iphone7)
111
113
  IPHONE_7_PLUS ||= Frameit::Device.new("iphone-7-plus", "Apple iPhone 7 Plus", 5, [[1242, 2208], [2208, 1242]], 401, Color::MATTE_BLACK, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_55, :use_legacy_iphone7)
112
114
  IPHONE_8 ||= Frameit::Device.new("iphone-8", "Apple iPhone 8", 6, [[750, 1334], [1334, 750]], 326, Color::SPACE_GRAY)
113
- IPHONE_8_PLUS ||= Frameit::Device.new("iphone-8-plus", "Apple iPhone 8 Plus", 6, [[1080, 1920], [1920, 1080]], 401, Color::SPACE_GRAY)
115
+ IPHONE_8_PLUS ||= Frameit::Device.new("iphone-8-plus", "Apple iPhone 8 Plus", 6, [[1242, 2208], [2208, 1242]], 401, Color::SPACE_GRAY)
114
116
  IPHONE_X ||= Frameit::Device.new("iphone-X", "Apple iPhone X", 7, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_58, :use_legacy_iphonex)
115
117
  IPHONE_XS ||= Frameit::Device.new("iphone-XS", "Apple iPhone XS", 8, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_58, :use_legacy_iphonexs)
116
118
  IPHONE_XR ||= Frameit::Device.new("iphone-XR", "Apple iPhone XR", 8, [[828, 1792], [1792, 828]], 326, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_61, :use_legacy_iphonexr)
@@ -118,6 +120,10 @@ module Frameit
118
120
  IPHONE_11 ||= Frameit::Device.new("iphone-11", "Apple iPhone 11", 9, [[828, 1792], [1792, 828]], 326, Color::BLACK, Platform::IOS)
119
121
  IPHONE_11_PRO ||= Frameit::Device.new("iphone-11-pro", "Apple iPhone 11 Pro", 9, [[1125, 2436], [2436, 1125]], 458, Color::SPACE_GRAY, Platform::IOS)
120
122
  IPHONE_11_PRO_MAX ||= Frameit::Device.new("iphone11-pro-max", "Apple iPhone 11 Pro Max", 9, [[1242, 2688], [2688, 1242]], 458, Color::SPACE_GRAY, Platform::IOS)
123
+ IPHONE_12 ||= Frameit::Device.new("iphone-12", "Apple iPhone 12", 10, [[1170, 2532], [2532, 1170]], 460, Color::BLACK, Platform::IOS)
124
+ IPHONE_12_PRO ||= Frameit::Device.new("iphone-12-pro", "Apple iPhone 12 Pro", 10, [[1170, 2532], [2532, 1170]], 460, Color::SPACE_GRAY, Platform::IOS)
125
+ IPHONE_12_PRO_MAX ||= Frameit::Device.new("iphone12-pro-max", "Apple iPhone 12 Pro Max", 10, [[1284, 2778], [2778, 1284]], 458, Color::GRAPHITE, Platform::IOS)
126
+ IPHONE_12_MINI ||= Frameit::Device.new("iphone-12-mini", "Apple iPhone 12 Mini", 10, [[1125, 2436], [2436, 1125]], 476, Color::BLACK, Platform::IOS)
121
127
  IPAD_10_2 ||= Frameit::Device.new("ipad-10-2", "Apple iPad 10.2", 1, [[1620, 2160], [2160, 1620]], 264, Color::SPACE_GRAY, Platform::IOS)
122
128
  IPAD_AIR_2 ||= Frameit::Device.new("ipad-air-2", "Apple iPad Air 2", 1, [[1536, 2048], [2048, 1536]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD)
123
129
  IPAD_AIR_2019 ||= Frameit::Device.new("ipad-air-2019", "Apple iPad Air (2019)", 2, [[1668, 2224], [2224, 1668]], 265, Color::SPACE_GRAY, Platform::IOS)
@@ -71,8 +71,9 @@ module Frameit
71
71
  def download_file(path, txt: "file")
72
72
  require 'uri'
73
73
  require 'excon'
74
+ require 'addressable/uri'
74
75
 
75
- url = File.join(HOST_URL, Frameit.frames_version, URI.escape(path))
76
+ url = File.join(HOST_URL, Frameit.frames_version, Addressable::URI.encode(path))
76
77
  UI.message("Downloading #{txt} from '#{url}' ...")
77
78
  body = Excon.get(url).body
78
79
  raise body if body.include?("<Error>")
@@ -17,8 +17,8 @@ module Gym
17
17
  final_mapping = (primary_mapping || {}).dup # for verbose output at the end of the method
18
18
  secondary_mapping ||= self.detect_project_profile_mapping # default to Xcode project
19
19
 
20
- final_mapping = Hash[final_mapping.map { |k, v| [k.to_sym, v] }]
21
- secondary_mapping = Hash[secondary_mapping.map { |k, v| [k.to_sym, v] }]
20
+ final_mapping = final_mapping.transform_keys(&:to_sym)
21
+ secondary_mapping = secondary_mapping.transform_keys(&:to_sym)
22
22
 
23
23
  # Now it's time to merge the (potentially) existing mapping
24
24
  # (e.g. coming from `provisioningProfiles` of the `export_options` or from previous match calls)
@@ -142,7 +142,7 @@ module Gym
142
142
  next unless specified_configuration == build_configuration.name
143
143
 
144
144
  # Catalyst apps will have some build settings that will have a configuration
145
- # that is specfic for macos so going to do our best to capture those
145
+ # that is specific for macos so going to do our best to capture those
146
146
  #
147
147
  # There are other platform filters besides "[sdk=macosx*]" that we could use but
148
148
  # this is the default that Xcode will use so this will also be our default
@@ -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 'manager'
6
7
  require_relative 'options'
@@ -28,7 +29,7 @@ module Gym
28
29
  program :help, "Author", "Felix Krause <gym@krausefx.com>"
29
30
  program :help, "Website", "https://fastlane.tools"
30
31
  program :help, "Documentation", "https://docs.fastlane.tools/actions/gym/"
31
- program :help_formatter, :compact
32
+ program :help_formatter, FastlaneCore::HelpFormatter
32
33
 
33
34
  global_option("--verbose") { FastlaneCore::Globals.verbose = true }
34
35
 
@@ -127,6 +127,14 @@ module Gym
127
127
  UI.build_failure!("Archive invalid")
128
128
  end
129
129
 
130
+ def handle_empty_ipa
131
+ UI.build_failure!("IPA invalid")
132
+ end
133
+
134
+ def handle_empty_pkg
135
+ UI.build_failure!("PKG invalid")
136
+ end
137
+
130
138
  private
131
139
 
132
140
  # Just to make things easier
@@ -39,6 +39,9 @@ module Gym
39
39
  options << "-destination '#{config[:destination]}'" if config[:destination]
40
40
  options << "-archivePath #{archive_path.shellescape}" unless config[:skip_archive]
41
41
  options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
42
+ if config[:use_system_scm] && !options.include?("-scmProvider system")
43
+ options << "-scmProvider system"
44
+ end
42
45
  options << config[:xcargs] if config[:xcargs]
43
46
  options << "OTHER_SWIFT_FLAGS=\"-Xfrontend -debug-time-function-bodies\"" if config[:analyze_build_time]
44
47
 
@@ -29,6 +29,10 @@ module Gym
29
29
  generator.pkg_path
30
30
  end
31
31
 
32
+ def binary_path
33
+ generator.binary_path
34
+ end
35
+
32
36
  def dsym_path
33
37
  generator.dsym_path
34
38
  end
@@ -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
 
@@ -75,34 +76,39 @@ module Gym
75
76
  Gym.cache[:ipa_path] = File.join(temporary_output_path, "#{Gym.config[:output_name]}.ipa")
76
77
  FileUtils.cp(path, Gym.cache[:ipa_path]) unless File.expand_path(path).casecmp?(File.expand_path(Gym.cache[:ipa_path]).downcase)
77
78
  else
78
- ErrorHandler.handle_empty_archive unless path
79
+ ErrorHandler.handle_empty_ipa unless path
79
80
  end
80
81
 
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
- ErrorHandler.handle_empty_archive unless path
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
@@ -105,11 +105,11 @@ module Gym
105
105
  FastlaneCore::ConfigItem.new(key: :export_method,
106
106
  short_option: "-j",
107
107
  env_name: "GYM_EXPORT_METHOD",
108
- description: "Method used to export the archive. Valid values are: app-store, ad-hoc, package, enterprise, development, developer-id",
108
+ description: "Method used to export the archive. Valid values are: app-store, validation, ad-hoc, package, enterprise, development, developer-id and mac-application",
109
109
  type: String,
110
110
  optional: true,
111
111
  verify_block: proc do |value|
112
- av = %w(app-store ad-hoc package enterprise development developer-id)
112
+ av = %w(app-store validation ad-hoc package enterprise development developer-id mac-application)
113
113
  UI.user_error!("Unsupported export_method '#{value}', must be: #{av}") unless av.include?(value)
114
114
  end),
115
115
  FastlaneCore::ConfigItem.new(key: :export_options,
@@ -279,7 +279,23 @@ module Gym
279
279
  env_name: "GYM_CLONED_SOURCE_PACKAGES_PATH",
280
280
  description: "Sets a custom path for Swift Package Manager dependencies",
281
281
  type: String,
282
- optional: true)
282
+ optional: true),
283
+ FastlaneCore::ConfigItem.new(key: :skip_package_dependencies_resolution,
284
+ env_name: "GYM_SKIP_PACKAGE_DEPENDENCIES_RESOLUTION",
285
+ description: "Skips resolution of Swift Package Manager dependencies",
286
+ type: Boolean,
287
+ default_value: false),
288
+ FastlaneCore::ConfigItem.new(key: :disable_package_automatic_updates,
289
+ env_name: "GYM_DISABLE_PACKAGE_AUTOMATIC_UPDATES",
290
+ description: "Prevents packages from automatically being resolved to versions other than those recorded in the `Package.resolved` file",
291
+ type: Boolean,
292
+ default_value: false),
293
+ FastlaneCore::ConfigItem.new(key: :use_system_scm,
294
+ env_name: "GYM_USE_SYSTEM_SCM",
295
+ description: "Lets xcodebuild use system's scm configuration",
296
+ optional: true,
297
+ type: Boolean,
298
+ default_value: false)
283
299
  ]
284
300
  end
285
301
  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,8 +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
34
  iterate(self.working_directory) do |current|
34
35
  files << current
35
36
  encrypt_specific_file(path: current, password: password)
@@ -41,6 +42,7 @@ module Match
41
42
 
42
43
  def decrypt_files
43
44
  files = []
45
+ password = fetch_password!
44
46
  iterate(self.working_directory) do |current|
45
47
  files << current
46
48
  begin
@@ -50,7 +52,7 @@ module Match
50
52
  UI.error("Couldn't decrypt the repo, please make sure you enter the right password!")
51
53
  UI.user_error!("Invalid password passed via 'MATCH_PASSWORD'") if ENV["MATCH_PASSWORD"]
52
54
  clear_password
53
- self.decrypt_files # call itself
55
+ self.decrypt_files # Call itself
54
56
  return
55
57
  end
56
58
  UI.success("🔓 Decrypted '#{File.basename(current)}'") if FastlaneCore::Globals.verbose?
@@ -83,7 +85,7 @@ module Match
83
85
  end
84
86
 
85
87
  # Access the MATCH_PASSWORD, either from ENV variable, Keychain or user input
86
- def password
88
+ def fetch_password!
87
89
  password = ENV["MATCH_PASSWORD"]
88
90
  unless password
89
91
  item = Security::InternetPassword.find(server: server_name(self.keychain_name))