fastlane 2.163.0 → 2.168.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +80 -80
  3. data/cert/lib/cert/options.rb +1 -1
  4. data/cert/lib/cert/runner.rb +2 -2
  5. data/deliver/lib/deliver/app_screenshot.rb +6 -2
  6. data/deliver/lib/deliver/queue_worker.rb +14 -29
  7. data/deliver/lib/deliver/upload_metadata.rb +7 -2
  8. data/deliver/lib/deliver/upload_screenshots.rb +3 -5
  9. data/fastlane/lib/fastlane/actions/.download_dsyms.rb.swp +0 -0
  10. data/fastlane/lib/fastlane/actions/actions_helper.rb +1 -1
  11. data/fastlane/lib/fastlane/actions/add_git_tag.rb +9 -2
  12. data/fastlane/lib/fastlane/actions/appledoc.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +5 -1
  14. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +9 -0
  15. data/fastlane/lib/fastlane/actions/import_from_git.rb +9 -1
  16. data/fastlane/lib/fastlane/actions/is_ci.rb +1 -1
  17. data/fastlane/lib/fastlane/actions/register_devices.rb +4 -1
  18. data/fastlane/lib/fastlane/actions/set_changelog.rb +31 -3
  19. data/fastlane/lib/fastlane/actions/slather.rb +2 -2
  20. data/fastlane/lib/fastlane/actions/spm.rb +6 -0
  21. data/fastlane/lib/fastlane/actions/update_fastlane.rb +29 -8
  22. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +3 -3
  23. data/fastlane/lib/fastlane/cli_tools_distributor.rb +2 -2
  24. data/fastlane/lib/fastlane/fast_file.rb +74 -23
  25. data/fastlane/lib/fastlane/features.rb +1 -1
  26. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -0
  27. data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
  28. data/fastlane/lib/fastlane/version.rb +1 -1
  29. data/fastlane/swift/Deliverfile.swift +1 -1
  30. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  31. data/fastlane/swift/Fastfile.swift +1 -1
  32. data/fastlane/swift/Fastlane.swift +37 -16
  33. data/fastlane/swift/Gymfile.swift +1 -1
  34. data/fastlane/swift/GymfileProtocol.swift +1 -1
  35. data/fastlane/swift/LaneFileProtocol.swift +2 -2
  36. data/fastlane/swift/MainProcess.swift +2 -0
  37. data/fastlane/swift/Matchfile.swift +1 -1
  38. data/fastlane/swift/MatchfileProtocol.swift +8 -4
  39. data/fastlane/swift/Precheckfile.swift +1 -1
  40. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  41. data/fastlane/swift/Runner.swift +1 -1
  42. data/fastlane/swift/Scanfile.swift +1 -1
  43. data/fastlane/swift/ScanfileProtocol.swift +5 -1
  44. data/fastlane/swift/Screengrabfile.swift +1 -1
  45. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  46. data/fastlane/swift/Snapshotfile.swift +1 -1
  47. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  48. data/fastlane/swift/SocketClient.swift +1 -1
  49. data/fastlane_core/lib/fastlane_core/cert_checker.rb +12 -7
  50. data/fastlane_core/lib/fastlane_core/device_manager.rb +8 -4
  51. data/fastlane_core/lib/fastlane_core/helper.rb +11 -3
  52. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -3
  53. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
  54. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +3 -1
  55. data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +8 -0
  56. data/gym/lib/gym/code_signing_mapping.rb +1 -1
  57. data/match/lib/match/importer.rb +33 -21
  58. data/match/lib/match/module.rb +1 -1
  59. data/match/lib/match/nuke.rb +9 -5
  60. data/match/lib/match/options.rb +8 -2
  61. data/pilot/lib/pilot/build_manager.rb +9 -3
  62. data/scan/lib/scan/detect_values.rb +8 -9
  63. data/scan/lib/scan/module.rb +4 -0
  64. data/scan/lib/scan/options.rb +9 -0
  65. data/scan/lib/scan/runner.rb +4 -3
  66. data/sigh/lib/assets/resign.sh +1 -1
  67. data/sigh/lib/sigh/runner.rb +4 -4
  68. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
  69. data/snapshot/lib/snapshot/test_command_generator.rb +1 -1
  70. data/snapshot/lib/snapshot/test_command_generator_base.rb +3 -1
  71. data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +1 -1
  72. data/spaceship/lib/spaceship/connect_api.rb +2 -0
  73. data/spaceship/lib/spaceship/connect_api/client.rb +7 -4
  74. data/spaceship/lib/spaceship/connect_api/models/.app.rb.swp +0 -0
  75. data/spaceship/lib/spaceship/connect_api/models/.app_screenshot.rb.swp +0 -0
  76. data/spaceship/lib/spaceship/connect_api/models/.build.rb.swp +0 -0
  77. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +3 -2
  78. data/spaceship/lib/spaceship/connect_api/models/app.rb +127 -51
  79. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +15 -10
  80. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +6 -4
  81. data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +15 -11
  82. data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +13 -9
  83. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +9 -7
  84. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +15 -11
  85. data/spaceship/lib/spaceship/connect_api/models/app_store_review_attachment.rb +7 -5
  86. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +6 -4
  87. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +54 -36
  88. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +21 -14
  89. data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +3 -2
  90. data/spaceship/lib/spaceship/connect_api/models/beta_app_review_submission.rb +3 -2
  91. data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +6 -4
  92. data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +12 -2
  93. data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +12 -8
  94. data/spaceship/lib/spaceship/connect_api/models/build.rb +24 -16
  95. data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +3 -2
  96. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +9 -6
  97. data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +6 -4
  98. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +12 -8
  99. data/spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb +43 -0
  100. data/spaceship/lib/spaceship/connect_api/models/custom_app_user.rb +41 -0
  101. data/spaceship/lib/spaceship/connect_api/models/device.rb +6 -4
  102. data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +6 -4
  103. data/spaceship/lib/spaceship/connect_api/models/profile.rb +12 -8
  104. data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +3 -2
  105. data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +9 -6
  106. data/spaceship/lib/spaceship/connect_api/models/territory.rb +3 -2
  107. data/spaceship/lib/spaceship/connect_api/models/user.rb +6 -4
  108. data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +9 -6
  109. data/spaceship/lib/spaceship/connect_api/spaceship.rb +7 -4
  110. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +12 -0
  111. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +71 -0
  112. data/spaceship/lib/spaceship/tunes/iap_detail.rb +1 -1
  113. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  114. data/supply/lib/supply.rb +1 -1
  115. data/supply/lib/supply/options.rb +1 -1
  116. data/supply/lib/supply/uploader.rb +4 -3
  117. metadata +24 -20
  118. data/fastlane/lib/fastlane/actions/.register_device.rb.swp +0 -0
  119. data/fastlane/lib/fastlane/actions/.register_devices.rb.swp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9018a049a27d02426f74370e23deb841ec641e4f446e6d334a7ae122223c1812
4
- data.tar.gz: 9c8f3652d0af272b012df00af5b191e78bcadc8da89aab7e8e4578bd40e5af31
3
+ metadata.gz: 163e53283c2657d2e37607fefd6985e72a01946a0448bd5f07c11f399462b81c
4
+ data.tar.gz: 3ad91b60198920341ca9725b227439a340ab997883fc40ecc5964b449502912a
5
5
  SHA512:
6
- metadata.gz: 10e7d05e7d169ca32bd90cb75e137c7acd9d04fdefc575d0e72bbe923e76e5ce121b6c528d82ea4acf78d0914d025e90fb7d01935cb147c4db60bc8dcb59dc00
7
- data.tar.gz: b2fa4c281f7f73fb6132588b6027a95c50f349e57c8c1093295b2f0757e5e0352fae18f59f5fb9070dc4927a2d87b99e2307fda64748b27ffbcf93901d99c810
6
+ metadata.gz: 036c78bc28cf70e5a92682e54cd1c4ce22a99e5b8a6fef788b78e898200fe829927dbaa31b120bcfc6abe1504e235854fc94ee3415c854e845d7c68a7e250309
7
+ data.tar.gz: 4f63a769059f91d26cf332c77c1eadceba29d0702d1222a41c6ccddfd2bcba91a8c53cbf83b0a04144d15c655361c93bd89f5f7769473549c1a5c86c1def4877
data/README.md CHANGED
@@ -34,55 +34,17 @@ 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='andrew-mcburney'>
38
- <a href='https://github.com/armcburney'>
39
- <img src='https://github.com/armcburney.png?size=140'>
40
- </a>
41
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
42
- </td>
43
- <td id='felix-krause'>
44
- <a href='https://github.com/KrauseFx'>
45
- <img src='https://github.com/KrauseFx.png?size=140'>
46
- </a>
47
- <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</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'>
52
- </a>
53
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
54
- </td>
55
- <td id='iulian-onofrei'>
56
- <a href='https://github.com/revolter'>
57
- <img src='https://github.com/revolter.png?size=140'>
58
- </a>
59
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
60
- </td>
61
- <td id='jimmy-dee'>
62
- <a href='https://github.com/jdee'>
63
- <img src='https://github.com/jdee.png?size=140'>
64
- </a>
65
- <h4 align='center'>Jimmy Dee</h4>
66
- </td>
67
- </tr>
68
- <tr>
69
- <td id='jan-piotrowski'>
70
- <a href='https://github.com/janpio'>
71
- <img src='https://github.com/janpio.png?size=140'>
72
- </a>
73
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
74
- </td>
75
- <td id='joshua-liebowitz'>
76
- <a href='https://github.com/taquitos'>
77
- <img src='https://github.com/taquitos.png?size=140'>
37
+ <td id='kohki-miki'>
38
+ <a href='https://github.com/giginet'>
39
+ <img src='https://github.com/giginet.png?size=140'>
78
40
  </a>
79
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
41
+ <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
80
42
  </td>
81
- <td id='max-ott'>
82
- <a href='https://github.com/max-ott'>
83
- <img src='https://github.com/max-ott.png?size=140'>
43
+ <td id='jérôme-lacoste'>
44
+ <a href='https://github.com/lacostej'>
45
+ <img src='https://github.com/lacostej.png?size=140'>
84
46
  </a>
85
- <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
47
+ <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
86
48
  </td>
87
49
  <td id='manu-wallner'>
88
50
  <a href='https://github.com/milch'>
@@ -90,51 +52,43 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
90
52
  </a>
91
53
  <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
92
54
  </td>
93
- <td id='josh-holtz'>
94
- <a href='https://github.com/joshdholtz'>
95
- <img src='https://github.com/joshdholtz.png?size=140'>
55
+ <td id='jimmy-dee'>
56
+ <a href='https://github.com/jdee'>
57
+ <img src='https://github.com/jdee.png?size=140'>
96
58
  </a>
97
- <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
59
+ <h4 align='center'>Jimmy Dee</h4>
98
60
  </td>
99
- </tr>
100
- <tr>
101
61
  <td id='jorge-revuelta-h'>
102
62
  <a href='https://github.com/minuscorp'>
103
63
  <img src='https://github.com/minuscorp.png?size=140'>
104
64
  </a>
105
65
  <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
106
66
  </td>
67
+ </tr>
68
+ <tr>
107
69
  <td id='aaron-brager'>
108
70
  <a href='https://github.com/getaaron'>
109
71
  <img src='https://github.com/getaaron.png?size=140'>
110
72
  </a>
111
73
  <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
112
74
  </td>
113
- <td id='stefan-natchev'>
114
- <a href='https://github.com/snatchev'>
115
- <img src='https://github.com/snatchev.png?size=140'>
116
- </a>
117
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
118
- </td>
119
- <td id='maksym-grebenets'>
120
- <a href='https://github.com/mgrebenets'>
121
- <img src='https://github.com/mgrebenets.png?size=140'>
75
+ <td id='daniel-jankowski'>
76
+ <a href='https://github.com/mollyIV'>
77
+ <img src='https://github.com/mollyIV.png?size=140'>
122
78
  </a>
123
- <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
79
+ <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
124
80
  </td>
125
- <td id='jérôme-lacoste'>
126
- <a href='https://github.com/lacostej'>
127
- <img src='https://github.com/lacostej.png?size=140'>
81
+ <td id='joshua-liebowitz'>
82
+ <a href='https://github.com/taquitos'>
83
+ <img src='https://github.com/taquitos.png?size=140'>
128
84
  </a>
129
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
85
+ <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
130
86
  </td>
131
- </tr>
132
- <tr>
133
- <td id='helmut-januschka'>
134
- <a href='https://github.com/hjanuschka'>
135
- <img src='https://github.com/hjanuschka.png?size=140'>
87
+ <td id='luka-mirosevic'>
88
+ <a href='https://github.com/lmirosevic'>
89
+ <img src='https://github.com/lmirosevic.png?size=140'>
136
90
  </a>
137
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
91
+ <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
138
92
  </td>
139
93
  <td id='matthew-ellis'>
140
94
  <a href='https://github.com/matthewellis'>
@@ -142,11 +96,13 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
142
96
  </a>
143
97
  <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
144
98
  </td>
145
- <td id='kohki-miki'>
146
- <a href='https://github.com/giginet'>
147
- <img src='https://github.com/giginet.png?size=140'>
99
+ </tr>
100
+ <tr>
101
+ <td id='iulian-onofrei'>
102
+ <a href='https://github.com/revolter'>
103
+ <img src='https://github.com/revolter.png?size=140'>
148
104
  </a>
149
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
105
+ <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
150
106
  </td>
151
107
  <td id='danielle-tomlinson'>
152
108
  <a href='https://github.com/endocrimes'>
@@ -154,12 +110,56 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
154
110
  </a>
155
111
  <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
156
112
  </td>
113
+ <td id='andrew-mcburney'>
114
+ <a href='https://github.com/armcburney'>
115
+ <img src='https://github.com/armcburney.png?size=140'>
116
+ </a>
117
+ <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
118
+ </td>
119
+ <td id='max-ott'>
120
+ <a href='https://github.com/max-ott'>
121
+ <img src='https://github.com/max-ott.png?size=140'>
122
+ </a>
123
+ <h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
124
+ </td>
125
+ <td id='jan-piotrowski'>
126
+ <a href='https://github.com/janpio'>
127
+ <img src='https://github.com/janpio.png?size=140'>
128
+ </a>
129
+ <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
130
+ </td>
131
+ </tr>
132
+ <tr>
157
133
  <td id='olivier-halligon'>
158
134
  <a href='https://github.com/AliSoftware'>
159
135
  <img src='https://github.com/AliSoftware.png?size=140'>
160
136
  </a>
161
137
  <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
162
138
  </td>
139
+ <td id='felix-krause'>
140
+ <a href='https://github.com/KrauseFx'>
141
+ <img src='https://github.com/KrauseFx.png?size=140'>
142
+ </a>
143
+ <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
144
+ </td>
145
+ <td id='helmut-januschka'>
146
+ <a href='https://github.com/hjanuschka'>
147
+ <img src='https://github.com/hjanuschka.png?size=140'>
148
+ </a>
149
+ <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
150
+ </td>
151
+ <td id='maksym-grebenets'>
152
+ <a href='https://github.com/mgrebenets'>
153
+ <img src='https://github.com/mgrebenets.png?size=140'>
154
+ </a>
155
+ <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
156
+ </td>
157
+ <td id='josh-holtz'>
158
+ <a href='https://github.com/joshdholtz'>
159
+ <img src='https://github.com/joshdholtz.png?size=140'>
160
+ </a>
161
+ <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
162
+ </td>
163
163
  </tr>
164
164
  <tr>
165
165
  <td id='fumiya-nakamura'>
@@ -168,11 +168,11 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
168
168
  </a>
169
169
  <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
170
170
  </td>
171
- <td id='daniel-jankowski'>
172
- <a href='https://github.com/mollyIV'>
173
- <img src='https://github.com/mollyIV.png?size=140'>
171
+ <td id='stefan-natchev'>
172
+ <a href='https://github.com/snatchev'>
173
+ <img src='https://github.com/snatchev.png?size=140'>
174
174
  </a>
175
- <h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
175
+ <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
176
176
  </td>
177
177
  </table>
178
178
 
@@ -109,7 +109,7 @@ module Cert
109
109
  short_option: "-p",
110
110
  env_name: "CERT_KEYCHAIN_PASSWORD",
111
111
  sensitive: true,
112
- description: "This might be required the first time you access certificates on a new mac. For the login/default keychain this is your account password",
112
+ description: "This might be required the first time you access certificates on a new mac. For the login/default keychain this is your macOS account password",
113
113
  optional: true),
114
114
  FastlaneCore::ConfigItem.new(key: :skip_set_partition_list,
115
115
  short_option: "-P",
@@ -190,7 +190,7 @@ module Cert
190
190
  begin
191
191
  certificate = Spaceship::ConnectAPI::Certificate.create(
192
192
  certificate_type: certificate_type,
193
- csr_content: csr
193
+ csr_content: csr.to_pem
194
194
  )
195
195
  rescue => ex
196
196
  type_name = (Cert.config[:development] ? "Development" : "Distribution")
@@ -232,7 +232,7 @@ module Cert
232
232
  cert_name = "#{cert_name}.cer" unless File.extname(cert_name) == ".cer"
233
233
  path = File.expand_path(File.join(Cert.config[:output_path], cert_name))
234
234
  raw_data = Base64.decode64(certificate.certificate_content)
235
- File.write(path, raw_data)
235
+ File.write(path, raw_data.force_encoding("UTF-8"))
236
236
  return path
237
237
  end
238
238
  end
@@ -187,7 +187,9 @@ module Deliver
187
187
  return {
188
188
  ScreenSize::IOS_65_MESSAGES => [
189
189
  [1242, 2688],
190
- [2688, 1242]
190
+ [2688, 1242],
191
+ [1284, 2778],
192
+ [2778, 1284]
191
193
  ],
192
194
  ScreenSize::IOS_61_MESSAGES => [
193
195
  [828, 1792],
@@ -243,7 +245,9 @@ module Deliver
243
245
  return {
244
246
  ScreenSize::IOS_65 => [
245
247
  [1242, 2688],
246
- [2688, 1242]
248
+ [2688, 1242],
249
+ [1284, 2778],
250
+ [2778, 1284]
247
251
  ],
248
252
  ScreenSize::IOS_61 => [
249
253
  [828, 1792],
@@ -6,9 +6,11 @@ module Deliver
6
6
  # Use this when you have all the items that you'll process in advance.
7
7
  # Simply enqueue them to this and call `QueueWorker#start`.
8
8
  class QueueWorker
9
+ NUMBER_OF_THREADS = Helper.test? ? 1 : [ENV.fetch("DELIVER_NUMBER_OF_THREADS", 10).to_i, 10].min
10
+
9
11
  # @param concurrency (Numeric) - A number of threads to be created
10
12
  # @param block (Proc) - A task you want to execute with enqueued items
11
- def initialize(concurrency, &block)
13
+ def initialize(concurrency = NUMBER_OF_THREADS, &block)
12
14
  @concurrency = concurrency
13
15
  @block = block
14
16
  @queue = Queue.new
@@ -19,46 +21,29 @@ module Deliver
19
21
  @queue.push(job)
20
22
  end
21
23
 
24
+ # @param jobs (Array<Object>) - An array of arbitary object that keeps parameters
25
+ def batch_enqueue(jobs)
26
+ raise(ArgumentError, "Enqueue Array instead of #{jobs.class}") unless jobs.kind_of?(Array)
27
+ jobs.each { |job| enqueue(job) }
28
+ end
29
+
22
30
  # Call this after you enqueuned all the jobs you want to process
23
31
  # This method blocks current thread until all the enqueued jobs are processed
24
32
  def start
33
+ @queue.close
34
+
25
35
  threads = []
26
36
  @concurrency.times do
27
37
  threads << Thread.new do
28
- while running? && !empty?
38
+ job = @queue.pop
39
+ while job
40
+ @block.call(job)
29
41
  job = @queue.pop
30
- @block.call(job) if job
31
42
  end
32
43
  end
33
44
  end
34
45
 
35
- wait_for_complete
36
46
  threads.each(&:join)
37
47
  end
38
-
39
- private
40
-
41
- def running?
42
- !@queue.closed?
43
- end
44
-
45
- def empty?
46
- @queue.empty?
47
- end
48
-
49
- def wait_for_complete
50
- wait_thread = Thread.new do
51
- loop do
52
- if @queue.empty?
53
- @queue.close
54
- break
55
- end
56
-
57
- sleep(1)
58
- end
59
- end
60
-
61
- wait_thread.join
62
- end
63
48
  end
64
49
  end
@@ -1,4 +1,5 @@
1
1
  require_relative 'module'
2
+ require_relative 'queue_worker'
2
3
 
3
4
  module Deliver
4
5
  # upload description, rating, etc.
@@ -197,22 +198,26 @@ module Deliver
197
198
  sleep(1)
198
199
 
199
200
  # Update app store version localizations
200
- app_store_version_localizations.each do |app_store_version_localization|
201
+ store_version_worker = Deliver::QueueWorker.new do |app_store_version_localization|
201
202
  attributes = localized_version_attributes_by_locale[app_store_version_localization.locale]
202
203
  if attributes
203
204
  UI.message("Uploading metadata to App Store Connect for localized version '#{app_store_version_localization.locale}'")
204
205
  app_store_version_localization.update(attributes: attributes)
205
206
  end
206
207
  end
208
+ store_version_worker.batch_enqueue(app_store_version_localizations)
209
+ store_version_worker.start
207
210
 
208
211
  # Update app info localizations
209
- app_info_localizations.each do |app_info_localization|
212
+ app_info_worker = Deliver::QueueWorker.new do |app_info_localization|
210
213
  attributes = localized_info_attributes_by_locale[app_info_localization.locale]
211
214
  if attributes
212
215
  UI.message("Uploading metadata to App Store Connect for localized info '#{app_info_localization.locale}'")
213
216
  app_info_localization.update(attributes: attributes)
214
217
  end
215
218
  end
219
+ app_info_worker.batch_enqueue(app_info_localizations)
220
+ app_info_worker.start
216
221
 
217
222
  # Update categories
218
223
  app_info = fetch_edit_app_info(app)
@@ -13,8 +13,6 @@ module Deliver
13
13
  DeleteScreenshotJob = Struct.new(:app_screenshot, :localization, :app_screenshot_set)
14
14
  UploadScreenshotJob = Struct.new(:app_screenshot_set, :path)
15
15
 
16
- NUMBER_OF_THREADS = Helper.test? ? 1 : [ENV.fetch("DELIVER_NUMBER_OF_THREADS", 10).to_i, 10].min
17
-
18
16
  def upload(options, screenshots)
19
17
  return if options[:skip_screenshots]
20
18
  return if options[:edit_live]
@@ -69,7 +67,7 @@ module Deliver
69
67
  def delete_screenshots(localizations, screenshots_per_language, tries: 5)
70
68
  tries -= 1
71
69
 
72
- worker = QueueWorker.new(NUMBER_OF_THREADS) do |job|
70
+ worker = QueueWorker.new do |job|
73
71
  start_time = Time.now
74
72
  target = "#{job.localization.locale} #{job.app_screenshot_set.screenshot_display_type} #{job.app_screenshot.id}"
75
73
  begin
@@ -115,7 +113,7 @@ module Deliver
115
113
  tries -= 1
116
114
 
117
115
  # Upload screenshots
118
- worker = QueueWorker.new(NUMBER_OF_THREADS) do |job|
116
+ worker = QueueWorker.new do |job|
119
117
  begin
120
118
  UI.verbose("Uploading '#{job.path}'...")
121
119
  start_time = Time.now
@@ -236,7 +234,7 @@ module Deliver
236
234
  iterator = AppScreenshotIterator.new(localizations)
237
235
 
238
236
  # Re-order screenshots within app_screenshot_set
239
- worker = QueueWorker.new(NUMBER_OF_THREADS) do |app_screenshot_set|
237
+ worker = QueueWorker.new do |app_screenshot_set|
240
238
  original_ids = app_screenshot_set.app_screenshots.map(&:id)
241
239
  sorted_ids = app_screenshot_set.app_screenshots.sort_by(&:file_name).map(&:id)
242
240
  if original_ids != sorted_ids
@@ -5,7 +5,7 @@ module Fastlane
5
5
  PLATFORM_NAME = :PLATFORM_NAME
6
6
  ENVIRONMENT = :ENVIRONMENT
7
7
 
8
- # A slighly decorated hash that will store and fetch sensitive data
8
+ # A slightly decorated hash that will store and fetch sensitive data
9
9
  # but not display it while iterating keys and values
10
10
  class LaneContextValues < Hash
11
11
  def initialize
@@ -6,7 +6,13 @@ module Fastlane
6
6
  # lane name in lane_context could be nil because you can just call $fastlane add_git_tag which has no context
7
7
  lane_name = Actions.lane_context[Actions::SharedValues::LANE_NAME].to_s.delete(' ') # no spaces allowed
8
8
 
9
- tag = options[:tag] || "#{options[:grouping]}/#{lane_name}/#{options[:prefix]}#{options[:build_number]}#{options[:postfix]}"
9
+ if options[:tag]
10
+ tag = options[:tag]
11
+ elsif options[:build_number]
12
+ tag = "#{options[:grouping]}/#{lane_name}/#{options[:prefix]}#{options[:build_number]}#{options[:postfix]}"
13
+ else
14
+ UI.user_error!("No value found for 'tag' or 'build_number'. At least one of them must be provided. Note that if you do specify a tag, all other arguments are ignored.")
15
+ end
10
16
  message = options[:message] || "#{tag} (fastlane)"
11
17
 
12
18
  cmd = ['git tag']
@@ -64,7 +70,8 @@ module Fastlane
64
70
  description: "The build number. Defaults to the result of increment_build_number if you\'re using it",
65
71
  default_value: Actions.lane_context[Actions::SharedValues::BUILD_NUMBER],
66
72
  default_value_dynamic: true,
67
- is_string: false),
73
+ is_string: false,
74
+ optional: true),
68
75
  FastlaneCore::ConfigItem.new(key: :message,
69
76
  env_name: "FL_GIT_TAG_MESSAGE",
70
77
  description: "The tag message. Defaults to the tag's name",