fastlane_hotfix 2.165.0 → 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 +44 -16
  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 +124 -92
  414. data/pilot/lib/pilot/features.rb +0 -0
  415. data/pilot/lib/pilot/tester_util.rb +0 -0
@@ -61,7 +61,7 @@ module Fastlane
61
61
  description: 'Whether or not all dSYM files are to be included. Optional, default is false in which only your app dSYM is included',
62
62
  default_value: false,
63
63
  optional: true,
64
- is_string: false,
64
+ type: Boolean,
65
65
  env_name: 'DSYM_ZIP_ALL')
66
66
  ]
67
67
  end
@@ -3,15 +3,11 @@ module Fastlane
3
3
  class EnsureEnvVarsAction < Action
4
4
  def self.run(params)
5
5
  variables = params[:env_vars]
6
+ missing_variables = variables.select { |variable| ENV[variable].to_s.strip.empty? }
6
7
 
7
- variables.each do |variable|
8
- next unless ENV[variable].to_s.strip.empty?
9
-
10
- UI.user_error!("Missing environment variable '#{variable}'")
11
- end
8
+ UI.user_error!("Missing environment variable(s) '#{missing_variables.join('\', \'')}'") unless missing_variables.empty?
12
9
 
13
10
  is_one = variables.length == 1
14
-
15
11
  UI.success("Environment variable#{is_one ? '' : 's'} '#{variables.join('\', \'')}' #{is_one ? 'is' : 'are'} set!")
16
12
  end
17
13
 
@@ -35,7 +35,6 @@ module Fastlane
35
35
  FastlaneCore::ConfigItem.new(key: :branch,
36
36
  env_name: "FL_ENSURE_GIT_BRANCH_NAME",
37
37
  description: "The branch that should be checked for. String that can be either the full name of the branch or a regex e.g. `^feature\/.*$` to match",
38
- is_string: true,
39
38
  default_value: 'master')
40
39
  ]
41
40
  end
@@ -65,18 +65,17 @@ module Fastlane
65
65
  description: "The flag whether to show uncommitted changes if the repo is dirty",
66
66
  optional: true,
67
67
  default_value: false,
68
- is_string: false),
68
+ type: Boolean),
69
69
  FastlaneCore::ConfigItem.new(key: :show_diff,
70
70
  env_name: "FL_ENSURE_GIT_STATUS_CLEAN_SHOW_DIFF",
71
71
  description: "The flag whether to show the git diff if the repo is dirty",
72
72
  optional: true,
73
73
  default_value: false,
74
- is_string: false),
74
+ type: Boolean),
75
75
  FastlaneCore::ConfigItem.new(key: :ignored,
76
76
  env_name: "FL_ENSURE_GIT_STATUS_CLEAN_IGNORED_FILE",
77
77
  description: "The flag whether to ignore file the git status if the repo is dirty",
78
- optional: true,
79
- is_string: true)
78
+ optional: true)
80
79
  ]
81
80
  end
82
81
 
@@ -84,18 +84,16 @@ module Fastlane
84
84
  env_name: "FL_ENSURE_NO_DEBUG_CODE_EXTENSIONS",
85
85
  description: "An array of file extensions that should be searched for",
86
86
  optional: true,
87
- is_string: false),
87
+ type: Array),
88
88
  FastlaneCore::ConfigItem.new(key: :exclude,
89
89
  env_name: "FL_ENSURE_NO_DEBUG_CODE_EXCLUDE",
90
90
  description: "Exclude a certain pattern from the search",
91
- optional: true,
92
- is_string: true),
91
+ optional: true),
93
92
  FastlaneCore::ConfigItem.new(key: :exclude_dirs,
94
93
  env_name: "FL_ENSURE_NO_DEBUG_CODE_EXCLUDE_DIRS",
95
94
  description: "An array of dirs that should not be included in the search",
96
95
  optional: true,
97
- type: Array,
98
- is_string: false)
96
+ type: Array)
99
97
  ]
100
98
  end
101
99
 
@@ -85,7 +85,6 @@ module Fastlane
85
85
  FastlaneCore::ConfigItem.new(key: :version,
86
86
  env_name: "FL_ENSURE_XCODE_VERSION",
87
87
  description: "Xcode version to verify that is selected",
88
- is_string: true,
89
88
  optional: true),
90
89
  FastlaneCore::ConfigItem.new(key: :strict,
91
90
  description: "Should the version be verified strictly (all 3 version numbers), or matching only the given version numbers (i.e. `11.3` == `11.3.x`)",
@@ -109,7 +108,7 @@ module Fastlane
109
108
 
110
109
  def self.example_code
111
110
  [
112
- 'ensure_xcode_version(version: "7.2")'
111
+ 'ensure_xcode_version(version: "12.5")'
113
112
  ]
114
113
  end
115
114
 
@@ -29,27 +29,19 @@ module Fastlane
29
29
 
30
30
  def self.available_options
31
31
  [
32
- FastlaneCore::ConfigItem.new(
33
- key: :set,
34
- env_name: 'FL_ENVIRONMENT_VARIABLE_SET',
35
- description: 'Set the environment variables named',
36
- optional: true,
37
- type: Hash
38
- ),
39
- FastlaneCore::ConfigItem.new(
40
- key: :get,
41
- env_name: 'FL_ENVIRONMENT_VARIABLE_GET',
42
- description: 'Get the environment variable named',
43
- optional: true,
44
- is_string: true
45
- ),
46
- FastlaneCore::ConfigItem.new(
47
- key: :remove,
48
- env_name: 'FL_ENVIRONMENT_VARIABLE_REMOVE',
49
- description: 'Remove the environment variable named',
50
- optional: true,
51
- is_string: true
52
- )
32
+ FastlaneCore::ConfigItem.new(key: :set,
33
+ env_name: 'FL_ENVIRONMENT_VARIABLE_SET',
34
+ description: 'Set the environment variables named',
35
+ optional: true,
36
+ type: Hash),
37
+ FastlaneCore::ConfigItem.new(key: :get,
38
+ env_name: 'FL_ENVIRONMENT_VARIABLE_GET',
39
+ description: 'Get the environment variable named',
40
+ optional: true),
41
+ FastlaneCore::ConfigItem.new(key: :remove,
42
+ env_name: 'FL_ENVIRONMENT_VARIABLE_REMOVE',
43
+ description: 'Remove the environment variable named',
44
+ optional: true)
53
45
  ]
54
46
  end
55
47
 
@@ -34,20 +34,17 @@ module Fastlane
34
34
  short_option: "-T",
35
35
  env_name: "FL_ERB_SRC",
36
36
  description: "ERB Template File",
37
- optional: false,
38
- is_string: true),
37
+ optional: false),
39
38
  FastlaneCore::ConfigItem.new(key: :destination,
40
39
  short_option: "-D",
41
40
  env_name: "FL_ERB_DST",
42
41
  description: "Destination file",
43
- optional: true,
44
- is_string: true),
42
+ optional: true),
45
43
  FastlaneCore::ConfigItem.new(key: :placeholders,
46
44
  short_option: "-p",
47
45
  env_name: "FL_ERB_PLACEHOLDERS",
48
46
  description: "Placeholders given as a hash",
49
47
  default_value: {},
50
- is_string: false,
51
48
  type: Hash),
52
49
  FastlaneCore::ConfigItem.new(key: :trim_mode,
53
50
  short_option: "-t",
@@ -83,7 +83,7 @@ module Fastlane
83
83
  env_name: "USE_HG_REVISION_NUMBER",
84
84
  description: "Use hg revision number instead of hash (ignored for non-hg repos)",
85
85
  optional: true,
86
- is_string: false,
86
+ type: Boolean,
87
87
  default_value: false)
88
88
  ]
89
89
  end
@@ -12,8 +12,12 @@ module Fastlane
12
12
  return if Helper.test?
13
13
 
14
14
  begin
15
+ # Only set :api_key from SharedValues if :api_key_path isn't set (conflicting options)
16
+ unless params[:api_key_path]
17
+ params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
18
+ end
19
+
15
20
  Cert.config = params # we alread have the finished config
16
- Cert.config[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
17
21
 
18
22
  Cert::Runner.new.launch
19
23
  cert_file_path = ENV["CER_FILE_PATH"]
@@ -11,6 +11,7 @@ module Fastlane
11
11
  GithubApiAction.run(
12
12
  server_url: params[:server_url],
13
13
  api_token: params[:api_token],
14
+ api_bearer: params[:api_bearer],
14
15
  http_method: 'GET',
15
16
  path: "repos/#{params[:url]}/releases",
16
17
  error_handlers: {
@@ -133,7 +134,16 @@ module Fastlane
133
134
  default_value: ENV["GITHUB_API_TOKEN"],
134
135
  default_value_dynamic: true,
135
136
  description: "GitHub Personal Token (required for private repositories)",
136
- optional: true)
137
+ conflicting_options: [:api_bearer],
138
+ optional: true),
139
+ FastlaneCore::ConfigItem.new(key: :api_bearer,
140
+ env_name: "FL_GITHUB_RELEASE_API_BEARER",
141
+ sensitive: true,
142
+ code_gen_sensitive: true,
143
+ description: "Use a Bearer authorization token. Usually generated by Github Apps, e.g. GitHub Actions GITHUB_TOKEN environment variable",
144
+ conflicting_options: [:api_token],
145
+ optional: true,
146
+ default_value: nil)
137
147
  ]
138
148
  end
139
149
 
@@ -40,7 +40,6 @@ module Fastlane
40
40
  FastlaneCore::ConfigItem.new(key: :ipa,
41
41
  env_name: "FL_GET_IPA_INFO_PLIST_VALUE_IPA",
42
42
  description: "Path to IPA",
43
- is_string: true,
44
43
  default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
45
44
  default_value_dynamic: true)
46
45
  ]
@@ -26,7 +26,9 @@ module Fastlane
26
26
  # Login
27
27
  credentials = JSON.parse(json_key_data)
28
28
  callback_uri = 'https://fastlane.github.io/managed_google_play-callback/callback.html'
29
- uri = "https://play.google.com/apps/publish/delegatePrivateApp?service_account=#{credentials['client_email']}&continueUrl=#{URI.encode_www_form_component(callback_uri)}"
29
+ require 'addressable/uri'
30
+ continueUrl = Addressable::URI.encode(callback_uri)
31
+ uri = "https://play.google.com/apps/publish/delegatePrivateApp?service_account=#{credentials['client_email']}&continueUrl=#{continueUrl}"
30
32
 
31
33
  UI.message("To obtain publishing rights for custom apps on Managed Play Store, open the following URL and log in:")
32
34
  UI.message("")
@@ -71,40 +73,35 @@ module Fastlane
71
73
 
72
74
  def self.available_options
73
75
  [
74
- FastlaneCore::ConfigItem.new(
75
- key: :json_key,
76
- env_name: "SUPPLY_JSON_KEY",
77
- short_option: "-j",
78
- conflicting_options: [:json_key_data],
79
- optional: true, # optional until it is possible specify either json_key OR json_key_data are required
80
- description: "The path to a file containing service account JSON, used to authenticate with Google",
81
- code_gen_sensitive: true,
82
- default_value: CredentialsManager::AppfileConfig.try_fetch_value(:json_key_file),
83
- default_value_dynamic: true,
84
- verify_block: proc do |value|
85
- UI.user_error!("Could not find service account json file at path '#{File.expand_path(value)}'") unless File.exist?(File.expand_path(value))
86
- UI.user_error!("'#{value}' doesn't seem to be a JSON file") unless FastlaneCore::Helper.json_file?(File.expand_path(value))
87
- end
88
- ),
89
- FastlaneCore::ConfigItem.new(
90
- key: :json_key_data,
91
- env_name: "SUPPLY_JSON_KEY_DATA",
92
- short_option: "-c",
93
- conflicting_options: [:json_key],
94
- optional: true,
95
- description: "The raw service account JSON data used to authenticate with Google",
96
- code_gen_sensitive: true,
97
- default_value: CredentialsManager::AppfileConfig.try_fetch_value(:json_key_data_raw),
98
- default_value_dynamic: true,
99
- verify_block: proc do |value|
100
- begin
101
- JSON.parse(value)
102
- rescue JSON::ParserError
103
- UI.user_error!("Could not parse service account json: JSON::ParseError")
104
- end
105
- end
106
- )
107
-
76
+ FastlaneCore::ConfigItem.new(key: :json_key,
77
+ env_name: "SUPPLY_JSON_KEY",
78
+ short_option: "-j",
79
+ conflicting_options: [:json_key_data],
80
+ optional: true, # optional until it is possible specify either json_key OR json_key_data are required
81
+ description: "The path to a file containing service account JSON, used to authenticate with Google",
82
+ code_gen_sensitive: true,
83
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:json_key_file),
84
+ default_value_dynamic: true,
85
+ verify_block: proc do |value|
86
+ UI.user_error!("Could not find service account json file at path '#{File.expand_path(value)}'") unless File.exist?(File.expand_path(value))
87
+ UI.user_error!("'#{value}' doesn't seem to be a JSON file") unless FastlaneCore::Helper.json_file?(File.expand_path(value))
88
+ end),
89
+ FastlaneCore::ConfigItem.new(key: :json_key_data,
90
+ env_name: "SUPPLY_JSON_KEY_DATA",
91
+ short_option: "-c",
92
+ conflicting_options: [:json_key],
93
+ optional: true,
94
+ description: "The raw service account JSON data used to authenticate with Google",
95
+ code_gen_sensitive: true,
96
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:json_key_data_raw),
97
+ default_value_dynamic: true,
98
+ verify_block: proc do |value|
99
+ begin
100
+ JSON.parse(value)
101
+ rescue JSON::ParserError
102
+ UI.user_error!("Could not parse service account json: JSON::ParseError")
103
+ end
104
+ end)
108
105
  ]
109
106
  end
110
107
 
@@ -14,8 +14,12 @@ module Fastlane
14
14
  require 'sigh'
15
15
  require 'credentials_manager/appfile_config'
16
16
 
17
+ # Only set :api_key from SharedValues if :api_key_path isn't set (conflicting options)
18
+ unless values[:api_key_path]
19
+ values[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
20
+ end
21
+
17
22
  Sigh.config = values # we already have the finished config
18
- Sigh.config[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
19
23
 
20
24
  path = Sigh::Manager.start
21
25
 
@@ -68,6 +72,10 @@ module Fastlane
68
72
  "The UUID of the profile sigh just fetched/generated"
69
73
  end
70
74
 
75
+ def self.return_type
76
+ :string
77
+ end
78
+
71
79
  def self.details
72
80
  "**Note**: It is recommended to use [match](https://docs.fastlane.tools/actions/match/) according to the [codesigning.guide](https://codesigning.guide) for generating and maintaining your provisioning profiles. Use _sigh_ directly only if you want full control over what's going on and know more about codesigning."
73
81
  end
@@ -55,7 +55,7 @@ module Fastlane
55
55
  @options << FastlaneCore::ConfigItem.new(key: :new_profile,
56
56
  description: "Block that is called if there is a new profile",
57
57
  optional: true,
58
- is_string: false)
58
+ type: :string_callback)
59
59
  @options
60
60
  end
61
61
 
@@ -8,14 +8,15 @@ module Fastlane
8
8
  require 'shellwords'
9
9
 
10
10
  def self.run(params)
11
- folder = params[:xcodeproj] ? File.join(params[:xcodeproj], '..') : '.'
11
+ xcodeproj_path_or_dir = params[:xcodeproj] || '.'
12
+ xcodeproj_dir = File.extname(xcodeproj_path_or_dir) == ".xcodeproj" ? File.dirname(xcodeproj_path_or_dir) : xcodeproj_path_or_dir
12
13
  target_name = params[:target]
13
14
  configuration = params[:configuration]
14
15
 
15
16
  # Get version_number
16
- project = get_project!(folder)
17
+ project = get_project!(xcodeproj_path_or_dir)
17
18
  target = get_target!(project, target_name)
18
- plist_file = get_plist!(folder, target, configuration)
19
+ plist_file = get_plist!(xcodeproj_dir, target, configuration)
19
20
  version_number = get_version_number_from_plist!(plist_file)
20
21
 
21
22
  # Get from build settings (or project settings) if needed (ex: $(MARKETING_VERSION) is default in Xcode 11)
@@ -39,13 +40,18 @@ module Fastlane
39
40
  return version_number
40
41
  end
41
42
 
42
- def self.get_project!(folder)
43
+ def self.get_project!(xcodeproj_path_or_dir)
43
44
  require 'xcodeproj'
44
- project_path = Dir.glob("#{folder}/*.xcodeproj").first
45
- if project_path
45
+ if File.extname(xcodeproj_path_or_dir) == ".xcodeproj"
46
+ project_path = xcodeproj_path_or_dir
47
+ else
48
+ project_path = Dir.glob("#{xcodeproj_path_or_dir}/*.xcodeproj").first
49
+ end
50
+
51
+ if project_path && File.exist?(project_path)
46
52
  return Xcodeproj::Project.open(project_path)
47
53
  else
48
- UI.user_error!("Unable to find Xcode project in folder: #{folder}")
54
+ UI.user_error!("Unable to find Xcode project at #{project_path || xcodeproj_path_or_dir}")
49
55
  end
50
56
  end
51
57
 
@@ -147,11 +153,12 @@ module Fastlane
147
153
  [
148
154
  FastlaneCore::ConfigItem.new(key: :xcodeproj,
149
155
  env_name: "FL_VERSION_NUMBER_PROJECT",
150
- description: "Path to the main Xcode project to read version number from, optional. By default will use the first Xcode project found within the project root directory",
156
+ description: "Path to the Xcode project to read version number from, or its containing directory, optional. If ommitted, or if a directory is passed instead, it will use the first Xcode project found within the given directory, or the project root directory if none is passed",
151
157
  optional: true,
152
158
  verify_block: proc do |value|
153
- UI.user_error!("Please pass the path to the project, not the workspace") if value.end_with?(".xcworkspace")
154
- UI.user_error!("Could not find Xcode project at path '#{File.expand_path(value)}'") if !File.exist?(value) && !Helper.test?
159
+ UI.user_error!("Please pass the path to the project or its containing directory, not the workspace path") if value.end_with?(".xcworkspace")
160
+ UI.user_error!("Could not find file or directory at path '#{File.expand_path(value)}'") unless File.exist?(value)
161
+ UI.user_error!("Could not find Xcode project in directory at path '#{File.expand_path(value)}'") if File.extname(value) != ".xcodeproj" && Dir.glob("#{value}/*.xcodeproj").empty?
155
162
  end),
156
163
  FastlaneCore::ConfigItem.new(key: :target,
157
164
  env_name: "FL_VERSION_NUMBER_TARGET",
@@ -8,13 +8,9 @@ module Fastlane
8
8
  paths = params[:pathspec]
9
9
  success_message = "Successfully added from \"#{paths}\" 💾."
10
10
  elsif params[:path]
11
- if params[:path].kind_of?(String)
12
- paths = shell_escape(params[:path], should_escape)
13
- elsif params[:path].kind_of?(Array)
14
- paths = params[:path].map do |p|
15
- shell_escape(p, should_escape)
16
- end.join(' ')
17
- end
11
+ paths = params[:path].map do |p|
12
+ shell_escape(p, should_escape)
13
+ end.join(' ')
18
14
  success_message = "Successfully added \"#{paths}\" 💾."
19
15
  else
20
16
  paths = "."
@@ -43,18 +39,17 @@ module Fastlane
43
39
  [
44
40
  FastlaneCore::ConfigItem.new(key: :path,
45
41
  description: "The file(s) and path(s) you want to add",
46
- is_string: false,
42
+ type: Array,
47
43
  conflicting_options: [:pathspec],
48
44
  optional: true),
49
45
  FastlaneCore::ConfigItem.new(key: :shell_escape,
50
46
  description: "Shell escapes paths (set to false if using wildcards or manually escaping spaces in :path)",
51
- is_string: false,
47
+ type: Boolean,
52
48
  default_value: true,
53
49
  optional: true),
54
50
  # Deprecated
55
51
  FastlaneCore::ConfigItem.new(key: :pathspec,
56
52
  description: "The pathspec you want to add files from",
57
- is_string: true,
58
53
  conflicting_options: [:path],
59
54
  optional: true,
60
55
  deprecated: "Use `--path` instead")
@@ -1,16 +1,10 @@
1
1
  module Fastlane
2
2
  module Actions
3
- module SharedValues
4
- GIT_BRANCH_ENV_VARS = %w(GIT_BRANCH BRANCH_NAME TRAVIS_BRANCH BITRISE_GIT_BRANCH CI_BUILD_REF_NAME CI_COMMIT_REF_NAME WERCKER_GIT_BRANCH BUILDKITE_BRANCH APPCENTER_BRANCH CIRCLE_BRANCH).reject do |branch|
5
- # Removing because tests break on CircleCI
6
- Helper.test? && branch == "CIRCLE_BRANCH"
7
- end.freeze
8
- end
9
-
10
3
  class GitBranchAction < Action
11
4
  def self.run(params)
12
- env_name = SharedValues::GIT_BRANCH_ENV_VARS.find { |env_var| FastlaneCore::Env.truthy?(env_var) }
13
- ENV.fetch(env_name.to_s) { `git symbolic-ref HEAD --short 2>/dev/null`.strip }
5
+ branch = Actions.git_branch || ""
6
+ return "" if branch == "HEAD" # Backwards compatibility with the original (and documented) implementation
7
+ branch
14
8
  end
15
9
 
16
10
  #####################################################
@@ -22,7 +16,7 @@ module Fastlane
22
16
  end
23
17
 
24
18
  def self.details
25
- "If no branch could be found, this action will return an empty string"
19
+ "If no branch could be found, this action will return an empty string. This is a wrapper for the internal action Actions.git_branch"
26
20
  end
27
21
 
28
22
  def self.available_options