fastlane 2.136.0 → 2.141.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +85 -72
  3. data/cert/lib/cert/options.rb +12 -5
  4. data/cert/lib/cert/runner.rb +13 -0
  5. data/deliver/lib/deliver/options.rb +2 -2
  6. data/deliver/lib/deliver/runner.rb +13 -2
  7. data/deliver/lib/deliver/submit_for_review.rb +7 -1
  8. data/fastlane/lib/fastlane/action.rb +2 -2
  9. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +1 -1
  10. data/fastlane/lib/fastlane/actions/build_app.rb +157 -6
  11. data/fastlane/lib/fastlane/actions/build_ios_app.rb +28 -132
  12. data/fastlane/lib/fastlane/actions/build_mac_app.rb +46 -0
  13. data/fastlane/lib/fastlane/actions/create_pull_request.rb +71 -2
  14. data/fastlane/lib/fastlane/actions/docs/{build_ios_app.md → build_app.md} +1 -1
  15. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +19 -0
  16. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +10 -0
  17. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +4 -2
  18. data/fastlane/lib/fastlane/actions/ensure_bundle_exec.rb +3 -3
  19. data/fastlane/lib/fastlane/actions/get_version_number.rb +7 -2
  20. data/fastlane/lib/fastlane/actions/gradle.rb +54 -3
  21. data/fastlane/lib/fastlane/actions/gym.rb +3 -7
  22. data/fastlane/lib/fastlane/actions/import_from_git.rb +4 -0
  23. data/fastlane/lib/fastlane/actions/increment_version_number.rb +6 -3
  24. data/fastlane/lib/fastlane/actions/last_git_tag.rb +14 -5
  25. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -2
  26. data/fastlane/lib/fastlane/actions/register_devices.rb +5 -1
  27. data/fastlane/lib/fastlane/actions/ruby_version.rb +1 -1
  28. data/fastlane/lib/fastlane/actions/run_tests.rb +5 -22
  29. data/fastlane/lib/fastlane/actions/set_github_release.rb +1 -1
  30. data/fastlane/lib/fastlane/actions/setup_ci.rb +14 -8
  31. data/fastlane/lib/fastlane/actions/testfairy.rb +8 -1
  32. data/fastlane/lib/fastlane/actions/update_plist.rb +37 -2
  33. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -0
  34. data/fastlane/lib/fastlane/actions/upload_to_play_store_internal_app_sharing.rb +78 -0
  35. data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
  36. data/fastlane/lib/fastlane/actions/xcode_select.rb +6 -1
  37. data/fastlane/lib/fastlane/cli_tools_distributor.rb +2 -2
  38. data/fastlane/lib/fastlane/commands_generator.rb +1 -1
  39. data/fastlane/lib/fastlane/fast_file.rb +13 -3
  40. data/fastlane/lib/fastlane/helper/adb_helper.rb +13 -4
  41. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -0
  42. data/fastlane/lib/fastlane/runner.rb +23 -18
  43. data/fastlane/lib/fastlane/version.rb +1 -1
  44. data/fastlane/swift/Deliverfile.swift +1 -1
  45. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  46. data/fastlane/swift/Fastlane.swift +342 -66
  47. data/fastlane/swift/Gymfile.swift +1 -1
  48. data/fastlane/swift/GymfileProtocol.swift +17 -1
  49. data/fastlane/swift/Matchfile.swift +1 -1
  50. data/fastlane/swift/MatchfileProtocol.swift +12 -4
  51. data/fastlane/swift/Precheckfile.swift +1 -1
  52. data/fastlane/swift/Scanfile.swift +1 -1
  53. data/fastlane/swift/ScanfileProtocol.swift +17 -1
  54. data/fastlane/swift/Screengrabfile.swift +1 -1
  55. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -9
  56. data/fastlane/swift/Snapshotfile.swift +1 -1
  57. data/fastlane/swift/SnapshotfileProtocol.swift +9 -1
  58. data/fastlane_core/lib/fastlane_core/build_watcher.rb +6 -2
  59. data/fastlane_core/lib/fastlane_core/cert_checker.rb +28 -0
  60. data/fastlane_core/lib/fastlane_core/device_manager.rb +20 -0
  61. data/fastlane_core/lib/fastlane_core/helper.rb +7 -1
  62. data/fastlane_core/lib/fastlane_core/project.rb +23 -0
  63. data/frameit/lib/frameit/editor.rb +3 -0
  64. data/gym/lib/gym/code_signing_mapping.rb +32 -3
  65. data/gym/lib/gym/detect_values.rb +34 -2
  66. data/gym/lib/gym/generators/build_command_generator.rb +1 -0
  67. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  68. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +47 -17
  69. data/gym/lib/gym/module.rb +8 -0
  70. data/gym/lib/gym/options.rb +25 -1
  71. data/gym/lib/gym/runner.rb +63 -23
  72. data/match/lib/match/encryption/openssl.rb +1 -1
  73. data/match/lib/match/generator.rb +17 -3
  74. data/match/lib/match/module.rb +4 -1
  75. data/match/lib/match/nuke.rb +54 -16
  76. data/match/lib/match/options.rb +28 -15
  77. data/match/lib/match/runner.rb +21 -8
  78. data/match/lib/match/spaceship_ensure.rb +19 -9
  79. data/match/lib/match/storage/git_storage.rb +11 -3
  80. data/pilot/lib/pilot/build_manager.rb +46 -12
  81. data/pilot/lib/pilot/options.rb +3 -1
  82. data/scan/lib/scan/detect_values.rb +6 -1
  83. data/scan/lib/scan/manager.rb +18 -1
  84. data/scan/lib/scan/options.rb +23 -1
  85. data/scan/lib/scan/runner.rb +6 -0
  86. data/scan/lib/scan/slack_poster.rb +1 -1
  87. data/scan/lib/scan/test_command_generator.rb +1 -1
  88. data/screengrab/lib/screengrab/options.rb +1 -10
  89. data/screengrab/lib/screengrab/runner.rb +16 -19
  90. data/snapshot/lib/snapshot/options.rb +12 -1
  91. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  92. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +11 -0
  93. data/spaceship/lib/spaceship/client.rb +9 -4
  94. data/spaceship/lib/spaceship/connect_api.rb +2 -0
  95. data/spaceship/lib/spaceship/connect_api/models/app.rb +11 -0
  96. data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +75 -0
  97. data/spaceship/lib/spaceship/connect_api/models/beta_screenshot.rb +18 -0
  98. data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -0
  99. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +5 -0
  100. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +15 -0
  101. data/spaceship/lib/spaceship/portal/app.rb +11 -2
  102. data/spaceship/lib/spaceship/tunes/iap.rb +11 -11
  103. data/spaceship/lib/spaceship/tunes/iap_detail.rb +7 -3
  104. data/spaceship/lib/spaceship/tunes/iap_families.rb +12 -1
  105. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +26 -17
  106. data/spaceship/lib/spaceship/tunes/iap_status.rb +5 -1
  107. data/spaceship/lib/spaceship/tunes/tunes_client.rb +4 -7
  108. data/supply/lib/supply/client.rb +27 -0
  109. data/supply/lib/supply/options.rb +8 -2
  110. data/supply/lib/supply/uploader.rb +55 -26
  111. metadata +44 -25
  112. data/supply/lib/supply/.uploader.rb.swp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8c1652cb1f5fa0d2fbd567e4d4721fc85be17dae9506afcf4fe8c9bd80c3ec6
4
- data.tar.gz: d257b400a19b96ccb7a0803af98f71cc6af521b8745a27e4a5083e547a7387bd
3
+ metadata.gz: d66ea0e82a638091cb2b4fba453027bd4deae45204e4b0060e371bcdfdd42377
4
+ data.tar.gz: 579a0b416a314bfbac2b5bce550d2788f9dae40a7fc9686cf47d5b20b8be3dda
5
5
  SHA512:
6
- metadata.gz: a83e00a94cac8a0ac90f1273f70c1676dc1ddee5190599b84c1b2759b09d6f79054cbf13e9b1c3c1c7c928ccb941ec322a35ff9f479c7324db1ff9c71f541917
7
- data.tar.gz: 1a70fc80b4d8bfddec51d92044dbc36d806629ae03e8d3b55be3832d5694ecb06391f1c2e6df47477c439c61522a4849317fac988f360e7407bd206caac96bfb
6
+ metadata.gz: e59b4a106d204a597833eb62f3cacddb865f8c55702ec510331415c0efcb5de5d7d5442ca2e55c731bdc3a57be57331113dd626864792ca2c7722ffcca6b5649
7
+ data.tar.gz: 17f635afbd24dd656d231eb32f3fdd9240093715c0abdaaea3c39cbedec9475b6a8659baec933539b1a29585fccae9c4482f7e57af18bc648526728b3f61dcf5
data/README.md CHANGED
@@ -34,43 +34,49 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
34
34
  <!-- This table is regenerated and resorted on each release -->
35
35
  <table id='team'>
36
36
  <tr>
37
+ <td id='jimmy-dee'>
38
+ <a href='https://github.com/jdee'>
39
+ <img src='https://github.com/jdee.png?size=140'>
40
+ </a>
41
+ <h4 align='center'>Jimmy Dee</h4>
42
+ </td>
37
43
  <td id='felix-krause'>
38
44
  <a href='https://github.com/KrauseFx'>
39
45
  <img src='https://github.com/KrauseFx.png?size=140'>
40
46
  </a>
41
47
  <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
42
48
  </td>
43
- <td id='matthew-ellis'>
44
- <a href='https://github.com/matthewellis'>
45
- <img src='https://github.com/matthewellis.png?size=140'>
46
- </a>
47
- <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
48
- </td>
49
- <td id='luka-mirosevic'>
50
- <a href='https://github.com/lmirosevic'>
51
- <img src='https://github.com/lmirosevic.png?size=140'>
49
+ <td id='andrew-mcburney'>
50
+ <a href='https://github.com/armcburney'>
51
+ <img src='https://github.com/armcburney.png?size=140'>
52
52
  </a>
53
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
53
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
54
54
  </td>
55
- <td id='aaron-brager'>
56
- <a href='https://github.com/getaaron'>
57
- <img src='https://github.com/getaaron.png?size=140'>
55
+ <td id='jan-piotrowski'>
56
+ <a href='https://github.com/janpio'>
57
+ <img src='https://github.com/janpio.png?size=140'>
58
58
  </a>
59
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
59
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
60
60
  </td>
61
- <td id='fumiya-nakamura'>
62
- <a href='https://github.com/nafu'>
63
- <img src='https://github.com/nafu.png?size=140'>
61
+ <td id='olivier-halligon'>
62
+ <a href='https://github.com/AliSoftware'>
63
+ <img src='https://github.com/AliSoftware.png?size=140'>
64
64
  </a>
65
- <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
65
+ <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
66
66
  </td>
67
67
  </tr>
68
68
  <tr>
69
- <td id='manu-wallner'>
70
- <a href='https://github.com/milch'>
71
- <img src='https://github.com/milch.png?size=140'>
69
+ <td id='matthew-ellis'>
70
+ <a href='https://github.com/matthewellis'>
71
+ <img src='https://github.com/matthewellis.png?size=140'>
72
72
  </a>
73
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
73
+ <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
74
+ </td>
75
+ <td id='stefan-natchev'>
76
+ <a href='https://github.com/snatchev'>
77
+ <img src='https://github.com/snatchev.png?size=140'>
78
+ </a>
79
+ <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
74
80
  </td>
75
81
  <td id='helmut-januschka'>
76
82
  <a href='https://github.com/hjanuschka'>
@@ -78,55 +84,49 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
78
84
  </a>
79
85
  <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
80
86
  </td>
81
- <td id='kohki-miki'>
82
- <a href='https://github.com/giginet'>
83
- <img src='https://github.com/giginet.png?size=140'>
84
- </a>
85
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
86
- </td>
87
- <td id='maksym-grebenets'>
88
- <a href='https://github.com/mgrebenets'>
89
- <img src='https://github.com/mgrebenets.png?size=140'>
87
+ <td id='josh-holtz'>
88
+ <a href='https://github.com/joshdholtz'>
89
+ <img src='https://github.com/joshdholtz.png?size=140'>
90
90
  </a>
91
- <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
91
+ <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
92
92
  </td>
93
- <td id='stefan-natchev'>
94
- <a href='https://github.com/snatchev'>
95
- <img src='https://github.com/snatchev.png?size=140'>
93
+ <td id='jérôme-lacoste'>
94
+ <a href='https://github.com/lacostej'>
95
+ <img src='https://github.com/lacostej.png?size=140'>
96
96
  </a>
97
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
97
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
98
98
  </td>
99
99
  </tr>
100
100
  <tr>
101
- <td id='iulian-onofrei'>
102
- <a href='https://github.com/revolter'>
103
- <img src='https://github.com/revolter.png?size=140'>
101
+ <td id='kohki-miki'>
102
+ <a href='https://github.com/giginet'>
103
+ <img src='https://github.com/giginet.png?size=140'>
104
104
  </a>
105
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
105
+ <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
106
106
  </td>
107
- <td id='andrew-mcburney'>
108
- <a href='https://github.com/armcburney'>
109
- <img src='https://github.com/armcburney.png?size=140'>
107
+ <td id='aaron-brager'>
108
+ <a href='https://github.com/getaaron'>
109
+ <img src='https://github.com/getaaron.png?size=140'>
110
110
  </a>
111
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
111
+ <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
112
112
  </td>
113
- <td id='olivier-halligon'>
114
- <a href='https://github.com/AliSoftware'>
115
- <img src='https://github.com/AliSoftware.png?size=140'>
113
+ <td id='luka-mirosevic'>
114
+ <a href='https://github.com/lmirosevic'>
115
+ <img src='https://github.com/lmirosevic.png?size=140'>
116
116
  </a>
117
- <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
117
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
118
118
  </td>
119
- <td id='jorge-revuelta-h'>
120
- <a href='https://github.com/minuscorp'>
121
- <img src='https://github.com/minuscorp.png?size=140'>
119
+ <td id='joshua-liebowitz'>
120
+ <a href='https://github.com/taquitos'>
121
+ <img src='https://github.com/taquitos.png?size=140'>
122
122
  </a>
123
- <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
123
+ <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
124
124
  </td>
125
- <td id='josh-holtz'>
126
- <a href='https://github.com/joshdholtz'>
127
- <img src='https://github.com/joshdholtz.png?size=140'>
125
+ <td id='manu-wallner'>
126
+ <a href='https://github.com/milch'>
127
+ <img src='https://github.com/milch.png?size=140'>
128
128
  </a>
129
- <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
129
+ <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
130
130
  </td>
131
131
  </tr>
132
132
  <tr>
@@ -136,31 +136,44 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
136
136
  </a>
137
137
  <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
138
138
  </td>
139
- <td id='jérôme-lacoste'>
140
- <a href='https://github.com/lacostej'>
141
- <img src='https://github.com/lacostej.png?size=140'>
139
+ <td id='jorge-revuelta-h'>
140
+ <a href='https://github.com/minuscorp'>
141
+ <img src='https://github.com/minuscorp.png?size=140'>
142
142
  </a>
143
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
143
+ <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
144
144
  </td>
145
- <td id='joshua-liebowitz'>
146
- <a href='https://github.com/taquitos'>
147
- <img src='https://github.com/taquitos.png?size=140'>
145
+ <td id='iulian-onofrei'>
146
+ <a href='https://github.com/revolter'>
147
+ <img src='https://github.com/revolter.png?size=140'>
148
148
  </a>
149
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
149
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
150
150
  </td>
151
- <td id='jan-piotrowski'>
152
- <a href='https://github.com/janpio'>
153
- <img src='https://github.com/janpio.png?size=140'>
151
+ <td id='daniel-jankowski'>
152
+ <a href='https://github.com/mollyIV'>
153
+ <img src='https://github.com/mollyIV.png?size=140'>
154
154
  </a>
155
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
155
+ <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
156
156
  </td>
157
- <td id='jimmy-dee'>
158
- <a href='https://github.com/jdee'>
159
- <img src='https://github.com/jdee.png?size=140'>
157
+ <td id='max-ott'>
158
+ <a href='https://github.com/max-ott'>
159
+ <img src='https://github.com/max-ott.png?size=140'>
160
160
  </a>
161
- <h4 align='center'>Jimmy Dee</h4>
161
+ <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
162
162
  </td>
163
163
  </tr>
164
+ <tr>
165
+ <td id='maksym-grebenets'>
166
+ <a href='https://github.com/mgrebenets'>
167
+ <img src='https://github.com/mgrebenets.png?size=140'>
168
+ </a>
169
+ <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
170
+ </td>
171
+ <td id='fumiya-nakamura'>
172
+ <a href='https://github.com/nafu'>
173
+ <img src='https://github.com/nafu.png?size=140'>
174
+ </a>
175
+ <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
176
+ </td>
164
177
  </table>
165
178
 
166
179
  Special thanks to all [contributors](https://github.com/fastlane/fastlane/graphs/contributors) for extending and improving _fastlane_.
@@ -13,12 +13,21 @@ module Cert
13
13
  FastlaneCore::ConfigItem.new(key: :development,
14
14
  env_name: "CERT_DEVELOPMENT",
15
15
  description: "Create a development certificate instead of a distribution one",
16
- is_string: false,
16
+ type: Boolean,
17
17
  default_value: false),
18
+ FastlaneCore::ConfigItem.new(key: :type,
19
+ env_name: "CERT_TYPE",
20
+ description: "Create specific certificate type (takes precedence over :development)",
21
+ optional: true,
22
+ verify_block: proc do |value|
23
+ value = value.to_s
24
+ types = %w(mac_installer_distribution developer_id_installer developer_id_application)
25
+ UI.user_error!("Unsupported types, must be: #{types}") unless types.include?(value)
26
+ end),
18
27
  FastlaneCore::ConfigItem.new(key: :force,
19
28
  env_name: "CERT_FORCE",
20
29
  description: "Create a certificate even if an existing certificate exists",
21
- is_string: false,
30
+ type: Boolean,
22
31
  default_value: false),
23
32
  FastlaneCore::ConfigItem.new(key: :generate_apple_certs,
24
33
  env_name: "CERT_GENERATE_APPLE_CERTS",
@@ -58,8 +67,7 @@ module Cert
58
67
  short_option: "-q",
59
68
  env_name: "CERT_FILE_NAME",
60
69
  optional: true,
61
- description: "The filename of certificate to store",
62
- is_string: true),
70
+ description: "The filename of certificate to store"),
63
71
  FastlaneCore::ConfigItem.new(key: :output_path,
64
72
  short_option: "-o",
65
73
  env_name: "CERT_OUTPUT_PATH",
@@ -85,7 +93,6 @@ module Cert
85
93
  FastlaneCore::ConfigItem.new(key: :platform,
86
94
  env_name: "CERT_PLATFORM",
87
95
  description: "Set the provisioning profile's platform (ios, macos)",
88
- is_string: false,
89
96
  default_value: "ios",
90
97
  verify_block: proc do |value|
91
98
  value = value.to_s
@@ -134,6 +134,19 @@ module Cert
134
134
 
135
135
  # The kind of certificate we're interested in
136
136
  def certificate_type
137
+ if Cert.config[:type]
138
+ case Cert.config[:type].to_sym
139
+ when :mac_installer_distribution
140
+ return Spaceship.certificate.mac_installer_distribution
141
+ when :developer_id_application
142
+ return Spaceship.certificate.developer_id_application
143
+ when :developer_id_installer
144
+ return Spaceship.certificate.developer_id_installer
145
+ else
146
+ UI.user_error("Unaccepted value for :type - #{Cert.config[:type]}")
147
+ end
148
+ end
149
+
137
150
  # Check if apple certs (Xcode 11 and later) should be used
138
151
  if Cert.config[:generate_apple_certs]
139
152
  cert_type = Spaceship.certificate.apple_distribution
@@ -149,12 +149,12 @@ module Deliver
149
149
 
150
150
  # release
151
151
  FastlaneCore::ConfigItem.new(key: :automatic_release,
152
- description: "Should the app be automatically released once it's approved?",
152
+ description: "Should the app be automatically released once it's approved? (Can not be used together with `auto_release_date`)",
153
153
  is_string: false,
154
154
  default_value: false),
155
155
  FastlaneCore::ConfigItem.new(key: :auto_release_date,
156
156
  env_name: "DELIVER_AUTO_RELEASE_DATE",
157
- description: "Date in milliseconds for automatically releasing on pending approval",
157
+ description: "Date in milliseconds for automatically releasing on pending approval (Can not be used together with `automatic_release`)",
158
158
  is_string: false,
159
159
  optional: true,
160
160
  conflicting_options: [:automatic_release],
@@ -140,14 +140,25 @@ module Deliver
140
140
  # Upload the binary to App Store Connect
141
141
  def upload_binary
142
142
  UI.message("Uploading binary to App Store Connect")
143
- if options[:ipa]
143
+
144
+ upload_ipa = options[:ipa]
145
+ upload_pkg = options[:pkg]
146
+
147
+ # 2020-01-27
148
+ # Only verify platform if if both ipa and pkg exists (for backwards support)
149
+ if upload_ipa && upload_pkg
150
+ upload_ipa = ["ios", "appletvos"].include?(options[:platform])
151
+ upload_pkg = options[:platform] == "osx"
152
+ end
153
+
154
+ if upload_ipa
144
155
  package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
145
156
  app_id: options[:app].apple_id,
146
157
  ipa_path: options[:ipa],
147
158
  package_path: "/tmp",
148
159
  platform: options[:platform]
149
160
  )
150
- elsif options[:pkg]
161
+ elsif upload_pkg
151
162
  package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
152
163
  app_id: options[:app].apple_id,
153
164
  pkg_path: options[:pkg],
@@ -58,11 +58,17 @@ module Deliver
58
58
  start = Time.now
59
59
  build = nil
60
60
 
61
+ use_latest_version = app_version.nil?
62
+
61
63
  loop do
62
64
  # Sometimes candidate_builds don't appear immediately after submission
63
65
  # Wait for candidate_builds to appear on App Store Connect
64
66
  # Issue https://github.com/fastlane/fastlane/issues/10411
65
- candidate_builds = app.latest_version.candidate_builds
67
+ if use_latest_version
68
+ candidate_builds = app.latest_version.candidate_builds
69
+ else
70
+ candidate_builds = app.tunes_all_builds_for_train(train: app_version)
71
+ end
66
72
  if (candidate_builds || []).count == 0
67
73
  UI.message("Waiting for candidate builds to appear...")
68
74
  if (Time.now - start) > (60 * 5)
@@ -110,7 +110,7 @@ module Fastlane
110
110
 
111
111
  # Is printed out in the Steps: output in the terminal
112
112
  # Return nil if you don't want any logging in the terminal/JUnit Report
113
- def self.step_text
113
+ def self.step_text(params)
114
114
  self.action_name
115
115
  end
116
116
 
@@ -121,7 +121,7 @@ module Fastlane
121
121
 
122
122
  # instead of "AddGitAction", this will return "add_git" to print it to the user
123
123
  def self.action_name
124
- self.name.split('::').last.gsub('Action', '').fastlane_underscore
124
+ self.name.split('::').last.gsub(/Action$/, '').fastlane_underscore
125
125
  end
126
126
 
127
127
  def self.lane_context
@@ -24,7 +24,7 @@ module Fastlane
24
24
  Spaceship::Tunes.select_team(team_id: params[:team_id], team_name: params[:team_name])
25
25
  UI.message("Login successful")
26
26
 
27
- app = Spaceship::Tunes::Application.find(params[:app_identifier])
27
+ app = Spaceship::Tunes::Application.find(params[:app_identifier], mac: params[:platform] == "osx")
28
28
  UI.user_error!("Could not find an app on App Store Connect with app_identifier: #{params[:app_identifier]}") unless app
29
29
  if params[:live]
30
30
  UI.message("Fetching the latest build number for live-version")
@@ -1,13 +1,164 @@
1
1
  module Fastlane
2
2
  module Actions
3
- require 'fastlane/actions/build_ios_app'
4
- class BuildAppAction < BuildIosAppAction
5
- #####################################################
6
- # @!group Documentation
7
- #####################################################
3
+ module SharedValues
4
+ IPA_OUTPUT_PATH ||= :IPA_OUTPUT_PATH
5
+ PKG_OUTPUT_PATH ||= :PKG_OUTPUT_PATH
6
+ DSYM_OUTPUT_PATH ||= :DSYM_OUTPUT_PATH
7
+ XCODEBUILD_ARCHIVE ||= :XCODEBUILD_ARCHIVE # originally defined in XcodebuildAction
8
+ end
9
+
10
+ class BuildAppAction < Action
11
+ def self.run(values)
12
+ require 'gym'
13
+
14
+ unless Actions.lane_context[SharedValues::SIGH_PROFILE_TYPE].to_s == "development"
15
+ values[:export_method] ||= Actions.lane_context[SharedValues::SIGH_PROFILE_TYPE]
16
+ end
17
+
18
+ if Actions.lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]
19
+ # Since Xcode 9 you need to explicitly provide the provisioning profile per app target
20
+ # If the user is smart and uses match and gym together with fastlane, we can do all
21
+ # the heavy lifting for them
22
+ values[:export_options] ||= {}
23
+ # It's not always a hash, because the user might have passed a string path to a ready plist file
24
+ # If that's the case, we won't set the provisioning profiles
25
+ # see https://github.com/fastlane/fastlane/issues/9490
26
+ if values[:export_options].kind_of?(Hash)
27
+ match_mapping = (Actions.lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING] || {}).dup
28
+ existing_mapping = (values[:export_options][:provisioningProfiles] || {}).dup
29
+
30
+ # Be smart about how we merge those mappings in case there are conflicts
31
+ mapping_object = Gym::CodeSigningMapping.new
32
+ hash_to_use = mapping_object.merge_profile_mapping(primary_mapping: existing_mapping,
33
+ secondary_mapping: match_mapping,
34
+ export_method: values[:export_method])
35
+
36
+ values[:export_options][:provisioningProfiles] = hash_to_use
37
+ else
38
+ self.show_xcode_9_warning
39
+ end
40
+ elsif Actions.lane_context[SharedValues::SIGH_PROFILE_PATHS]
41
+ # Since Xcode 9 you need to explicitly provide the provisioning profile per app target
42
+ # If the user used sigh we can match the profiles from sigh
43
+ values[:export_options] ||= {}
44
+ if values[:export_options].kind_of?(Hash)
45
+ # It's not always a hash, because the user might have passed a string path to a ready plist file
46
+ # If that's the case, we won't set the provisioning profiles
47
+ # see https://github.com/fastlane/fastlane/issues/9684
48
+ values[:export_options][:provisioningProfiles] ||= {}
49
+ Actions.lane_context[SharedValues::SIGH_PROFILE_PATHS].each do |profile_path|
50
+ begin
51
+ profile = FastlaneCore::ProvisioningProfile.parse(profile_path)
52
+ app_id_prefix = profile["ApplicationIdentifierPrefix"].first
53
+ bundle_id = profile["Entitlements"]["application-identifier"].gsub("#{app_id_prefix}.", "")
54
+ values[:export_options][:provisioningProfiles][bundle_id] = profile["Name"]
55
+ rescue => ex
56
+ UI.error("Couldn't load profile at path: #{profile_path}")
57
+ UI.error(ex)
58
+ UI.verbose(ex.backtrace.join("\n"))
59
+ end
60
+ end
61
+ else
62
+ self.show_xcode_9_warning
63
+ end
64
+ end
65
+
66
+ gym_output_path = Gym::Manager.new.work(values)
67
+ if gym_output_path.nil?
68
+ UI.important("No output path received from gym")
69
+ return nil
70
+ end
71
+
72
+ absolute_output_path = File.expand_path(gym_output_path)
73
+
74
+ # Binary path
75
+ if File.extname(absolute_output_path) == ".ipa"
76
+ absolute_dsym_path = absolute_output_path.gsub(/.ipa$/, ".app.dSYM.zip")
77
+
78
+ Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = absolute_output_path
79
+ ENV[SharedValues::IPA_OUTPUT_PATH.to_s] = absolute_output_path # for deliver
80
+ elsif File.extname(absolute_output_path) == ".pkg"
81
+ absolute_dsym_path = absolute_output_path.gsub(/.pkg$/, ".dSYM.zip")
82
+
83
+ Actions.lane_context[SharedValues::PKG_OUTPUT_PATH] = absolute_output_path
84
+ ENV[SharedValues::PKG_OUTPUT_PATH.to_s] = absolute_output_path # for deliver
85
+ end
86
+
87
+ # xcarchive path
88
+ Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE] = Gym::BuildCommandGenerator.archive_path
89
+
90
+ # dSYM path
91
+ if absolute_dsym_path && File.exist?(absolute_dsym_path)
92
+ Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = absolute_dsym_path
93
+ ENV[SharedValues::DSYM_OUTPUT_PATH.to_s] = absolute_dsym_path
94
+ end
95
+
96
+ return absolute_output_path
97
+ end
98
+ # rubocop:enable Metrics/PerceivedComplexity
8
99
 
9
100
  def self.description
10
- "Alias for the `build_ios_app` action"
101
+ "Easily build and sign your app (via _gym_)"
102
+ end
103
+
104
+ def self.details
105
+ "More information: https://fastlane.tools/gym"
106
+ end
107
+
108
+ def self.output
109
+ [
110
+ ['IPA_OUTPUT_PATH', 'The path to the newly generated ipa file'],
111
+ ['PKG_OUTPUT_PATH', 'The path to the newly generated pkg file'],
112
+ ['DSYM_OUTPUT_PATH', 'The path to the dSYM files'],
113
+ ['XCODEBUILD_ARCHIVE', 'The path to the xcodebuild archive']
114
+ ]
115
+ end
116
+
117
+ def self.return_value
118
+ "The absolute path to the generated ipa file"
119
+ end
120
+
121
+ def self.author
122
+ "KrauseFx"
123
+ end
124
+
125
+ def self.available_options
126
+ require 'gym'
127
+ Gym::Options.available_options
128
+ end
129
+
130
+ def self.is_supported?(platform)
131
+ [:ios, :mac].include?(platform)
132
+ end
133
+
134
+ def self.example_code
135
+ [
136
+ 'build_app(scheme: "MyApp", workspace: "MyApp.xcworkspace")',
137
+ 'build_app(
138
+ workspace: "MyApp.xcworkspace",
139
+ configuration: "Debug",
140
+ scheme: "MyApp",
141
+ silent: true,
142
+ clean: true,
143
+ output_directory: "path/to/dir", # Destination directory. Defaults to current directory.
144
+ output_name: "my-app.ipa", # specify the name of the .ipa file to generate (including file extension)
145
+ sdk: "iOS 11.1" # use SDK as the name or path of the base SDK when building the project.
146
+ )',
147
+ 'gym # alias for "build_app"',
148
+ 'build_ios_app # alias for "build_app (only iOS options)"',
149
+ 'build_mac_app # alias for "build_app (only macOS options)"'
150
+ ]
151
+ end
152
+
153
+ def self.category
154
+ :building
155
+ end
156
+
157
+ def self.show_xcode_9_warning
158
+ return unless Helper.xcode_at_least?("9.0")
159
+ UI.message("You passed a path to a custom plist file for exporting the binary.")
160
+ UI.message("Make sure to include information about what provisioning profiles to use with Xcode 9")
161
+ UI.message("More information: https://docs.fastlane.tools/codesigning/xcode-project/#xcode-9-and-up")
11
162
  end
12
163
  end
13
164
  end