fastlane 2.149.1 → 2.150.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/deliver/lib/deliver.rb +0 -1
  3. data/deliver/lib/deliver/app_screenshot.rb +26 -25
  4. data/deliver/lib/deliver/options.rb +6 -11
  5. data/deliver/lib/deliver/runner.rb +7 -4
  6. data/deliver/lib/deliver/setup.rb +5 -30
  7. data/deliver/lib/deliver/submit_for_review.rb +124 -87
  8. data/deliver/lib/deliver/upload_metadata.rb +284 -143
  9. data/deliver/lib/deliver/upload_price_tier.rb +15 -8
  10. data/deliver/lib/deliver/upload_screenshots.rb +86 -37
  11. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
  12. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +3 -11
  13. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +3 -2
  14. data/fastlane/lib/fastlane/actions/download_dsyms.rb +7 -1
  15. data/fastlane/lib/fastlane/actions/google_play_track_release_names.rb +74 -0
  16. data/fastlane/lib/fastlane/actions/slack.rb +1 -1
  17. data/fastlane/lib/fastlane/actions/spm.rb +7 -0
  18. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -32
  19. data/fastlane/lib/fastlane/lane.rb +3 -3
  20. data/fastlane/lib/fastlane/swift_fastlane_function.rb +8 -4
  21. data/fastlane/lib/fastlane/version.rb +1 -1
  22. data/fastlane/swift/ControlCommand.swift +1 -0
  23. data/fastlane/swift/Fastlane.swift +48 -12
  24. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +3 -9
  25. data/fastlane/swift/LaneFileProtocol.swift +2 -5
  26. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  27. data/fastlane/swift/RubyCommand.swift +29 -6
  28. data/fastlane/swift/RubyCommandable.swift +1 -0
  29. data/fastlane/swift/Runner.swift +85 -13
  30. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  31. data/fastlane/swift/SnapshotfileProtocol.swift +3 -3
  32. data/fastlane/swift/SocketClient.swift +76 -45
  33. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  34. data/fastlane/swift/SocketResponse.swift +1 -0
  35. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -3
  36. data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +7 -0
  37. data/frameit/lib/frameit/device_types.rb +100 -100
  38. data/produce/lib/produce/itunes_connect.rb +20 -20
  39. data/produce/lib/produce/options.rb +3 -3
  40. data/sigh/lib/assets/resign.sh +7 -7
  41. data/snapshot/lib/assets/SnapshotHelper.swift +5 -5
  42. data/snapshot/lib/assets/SnapshotHelperXcode8.swift +3 -3
  43. data/snapshot/lib/snapshot/options.rb +0 -1
  44. data/snapshot/lib/snapshot/reports_generator.rb +8 -1
  45. data/spaceship/lib/spaceship/.DS_Store +0 -0
  46. data/spaceship/lib/spaceship/connect_api.rb +21 -2
  47. data/spaceship/lib/spaceship/connect_api/client.rb +47 -11
  48. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  49. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +109 -0
  50. data/spaceship/lib/spaceship/connect_api/models/app.rb +113 -3
  51. data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
  52. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +74 -0
  53. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +38 -0
  54. data/spaceship/lib/spaceship/connect_api/models/app_price.rb +22 -0
  55. data/spaceship/lib/spaceship/connect_api/models/app_price_tier.rb +12 -0
  56. data/spaceship/lib/spaceship/connect_api/models/app_review_attachment.rb +81 -0
  57. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +117 -0
  58. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +101 -0
  59. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +51 -0
  60. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +182 -0
  61. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +70 -0
  62. data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +36 -0
  63. data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +26 -0
  64. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
  65. data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +40 -0
  66. data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +26 -0
  67. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +10 -3
  68. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +33 -0
  69. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +703 -0
  70. data/spaceship/lib/spaceship/spaceauth_runner.rb +2 -2
  71. data/supply/lib/supply/client.rb +19 -0
  72. data/supply/lib/supply/reader.rb +16 -0
  73. metadata +27 -24
  74. data/deliver/lib/deliver/upload_assets.rb +0 -27
  75. data/scan/lib/scan/.test_command_generator.rb.swp +0 -0
  76. data/snapshot/lib/snapshot/.test_command_generator_base.rb.swp +0 -0
@@ -0,0 +1,117 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppScreenshot
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :file_name
8
+ attr_accessor :source_file_checksum
9
+ attr_accessor :image_asset
10
+ attr_accessor :asset_token
11
+ attr_accessor :asset_type
12
+ attr_accessor :upload_operations
13
+ attr_accessor :asset_delivery_state
14
+ attr_accessor :uploaded
15
+
16
+ # "fileSize": 92542,
17
+ # "fileName": "ftl_3241d62418767c0aa9b889b020c4f8db_45455763d4aaf7b18ee0045bc787f3de.png",
18
+ # "sourceFileChecksum": "c237fd7852ed8f9285d16d9a28d2ec25",
19
+ # "imageAsset": {
20
+ # "templateUrl": "https://is4-ssl.mzstatic.com/image/thumb/Purple113/v4/61/18/68/61186886-b234-5bd0-1f4a-563124f18511/pr_source.png/{w}x{h}bb.{f}",
21
+ # "width": 2048,
22
+ # "height": 2732
23
+ # },
24
+ # "assetToken": "Purple113/v4/61/18/68/61186886-b234-5bd0-1f4a-563124f18511/pr_source.png",
25
+ # "assetType": "SortedJ99ScreenShot",
26
+ # "uploadOperations": null,
27
+ # "assetDeliveryState": {
28
+ # "errors": [],
29
+ # "warnings": null,
30
+ # "state": "COMPLETE"
31
+ # },
32
+ # "uploaded": null
33
+
34
+ # "assetDeliveryState": {
35
+ # "errors": [],
36
+ # "warnings": null,
37
+ # "state": "AWAITING_UPLOAD"
38
+ # },
39
+
40
+ # "assetDeliveryState": {
41
+ # "errors": [],
42
+ # "warnings": null,
43
+ # "state": "UPLOAD_COMPLETE"
44
+ # },
45
+
46
+ attr_mapping({
47
+ "fileName" => "file_name",
48
+ "sourceFileChecksum" => "source_file_checksum",
49
+ "imageAsset" => "image_asset",
50
+ "assetToken" => "asset_token",
51
+ "assetType" => "asset_type",
52
+ "uploadOperations" => "upload_operations",
53
+ "assetDeliveryState" => "asset_delivery_state",
54
+ "uploaded" => "uploaded"
55
+ })
56
+
57
+ def self.type
58
+ return "appScreenshots"
59
+ end
60
+
61
+ #
62
+ # API
63
+ #
64
+
65
+ def self.create(app_screenshot_set_id: nil, path: nil)
66
+ require 'faraday'
67
+
68
+ filename = File.basename(path)
69
+ filesize = File.size(path)
70
+ payload = File.binread(path)
71
+
72
+ post_attributes = {
73
+ fileSize: filesize,
74
+ fileName: filename
75
+ }
76
+
77
+ post_resp = Spaceship::ConnectAPI.post_app_screenshot(app_screenshot_set_id: app_screenshot_set_id, attributes: post_attributes).to_models.first
78
+
79
+ # {
80
+ # "method": "PUT",
81
+ # "url": "https://some-url-apple-gives-us",
82
+ # "length": 57365,
83
+ # "offset": 0,
84
+ # "requestHeaders": [
85
+ # {
86
+ # "name": "Content-Type",
87
+ # "value": "image/png"
88
+ # }
89
+ # ]
90
+ # }
91
+ upload_operation = post_resp.upload_operations.first
92
+
93
+ headers = {}
94
+ upload_operation["requestHeaders"].each do |hash|
95
+ headers[hash["name"]] = hash["value"]
96
+ end
97
+
98
+ Faraday.put(
99
+ upload_operation["url"],
100
+ payload,
101
+ headers
102
+ )
103
+
104
+ patch_attributes = {
105
+ uploaded: true,
106
+ sourceFileChecksum: "checksum-holder"
107
+ }
108
+
109
+ Spaceship::ConnectAPI.patch_app_screenshot(app_screenshot_id: post_resp.id, attributes: patch_attributes).to_models.first
110
+ end
111
+
112
+ def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
113
+ Spaceship::ConnectAPI.delete_app_screenshot(app_screenshot_id: id)
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,101 @@
1
+ require_relative '../model'
2
+ require_relative './app_screenshot'
3
+
4
+ module Spaceship
5
+ class ConnectAPI
6
+ class AppScreenshotSet
7
+ include Spaceship::ConnectAPI::Model
8
+
9
+ attr_accessor :screenshot_display_type
10
+
11
+ attr_accessor :app_screenshots
12
+
13
+ module DisplayType
14
+ APP_IPHONE_35 = "APP_IPHONE_35"
15
+ APP_IPHONE_40 = "APP_IPHONE_40"
16
+ APP_IPHONE_47 = "APP_IPHONE_47"
17
+ APP_IPHONE_55 = "APP_IPHONE_55"
18
+ APP_IPHONE_58 = "APP_IPHONE_58"
19
+ APP_IPHONE_65 = "APP_IPHONE_65"
20
+
21
+ APP_IPAD_97 = "APP_IPAD_97"
22
+ APP_IPAD_105 = "APP_IPAD_105"
23
+ APP_IPAD_PRO_3GEN_11 = "APP_IPAD_PRO_3GEN_11"
24
+ APP_IPAD_PRO_129 = "APP_IPAD_PRO_129"
25
+ APP_IPAD_PRO_3GEN_129 = "APP_IPAD_PRO_3GEN_129"
26
+
27
+ IMESSAGE_APP_IPHONE_40 = "IMESSAGE_APP_IPHONE_40"
28
+ IMESSAGE_APP_IPHONE_47 = "IMESSAGE_APP_IPHONE_47"
29
+ IMESSAGE_APP_IPHONE_55 = "IMESSAGE_APP_IPHONE_55"
30
+ IMESSAGE_APP_IPHONE_58 = "IMESSAGE_APP_IPHONE_58"
31
+ IMESSAGE_APP_IPHONE_65 = "IMESSAGE_APP_IPHONE_65"
32
+
33
+ IMESSAGE_APP_IPAD_97 = "IMESSAGE_APP_IPAD_97"
34
+ IMESSAGE_APP_IPAD_105 = "IMESSAGE_APP_IPAD_105"
35
+ IMESSAGE_APP_IPAD_PRO_129 = "IMESSAGE_APP_IPAD_PRO_129"
36
+ IMESSAGE_APP_IPAD_PRO_3GEN_11 = "IMESSAGE_APP_IPAD_PRO_3GEN_11"
37
+ IMESSAGE_APP_IPAD_PRO_3GEN_129 = "IMESSAGE_APP_IPAD_PRO_3GEN_129"
38
+
39
+ APP_WATCH_SERIES_3 = "APP_WATCH_SERIES_3"
40
+ APP_WATCH_SERIES_4 = "APP_WATCH_SERIES_4"
41
+
42
+ APP_DESKTOP = "APP_DESKTOP"
43
+
44
+ ALL = [
45
+ APP_IPHONE_35,
46
+ APP_IPHONE_40,
47
+ APP_IPHONE_47,
48
+ APP_IPHONE_55,
49
+ APP_IPHONE_58,
50
+ APP_IPHONE_65,
51
+
52
+ APP_IPAD_97,
53
+ APP_IPAD_105,
54
+ APP_IPAD_PRO_3GEN_11,
55
+ APP_IPAD_PRO_129,
56
+ APP_IPAD_PRO_3GEN_129,
57
+
58
+ IMESSAGE_APP_IPHONE_40,
59
+ IMESSAGE_APP_IPHONE_47,
60
+ IMESSAGE_APP_IPHONE_55,
61
+ IMESSAGE_APP_IPHONE_58,
62
+ IMESSAGE_APP_IPHONE_65,
63
+
64
+ IMESSAGE_APP_IPAD_97,
65
+ IMESSAGE_APP_IPAD_105,
66
+ IMESSAGE_APP_IPAD_PRO_129,
67
+ IMESSAGE_APP_IPAD_PRO_3GEN_11,
68
+ IMESSAGE_APP_IPAD_PRO_3GEN_129,
69
+
70
+ APP_WATCH_SERIES_3,
71
+ APP_WATCH_SERIES_4,
72
+
73
+ APP_DESKTOP
74
+ ]
75
+ end
76
+
77
+ attr_mapping({
78
+ "screenshotDisplayType" => "screenshot_display_type",
79
+
80
+ "appScreenshots" => "app_screenshots"
81
+ })
82
+
83
+ def self.type
84
+ return "appScreenshotSets"
85
+ end
86
+
87
+ #
88
+ # API
89
+ #
90
+
91
+ def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
92
+ resp = Spaceship::ConnectAPI.get_app_screenshot_sets(filter: filter, includes: includes, limit: limit, sort: sort)
93
+ return resp.to_models
94
+ end
95
+
96
+ def upload_screenshot(path: nil)
97
+ return Spaceship::ConnectAPI::AppScreenshot.create(app_screenshot_set_id: id, path: path)
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,51 @@
1
+ require_relative '../model'
2
+ require_relative './app_review_attachment'
3
+
4
+ module Spaceship
5
+ class ConnectAPI
6
+ class AppStoreReviewDetail
7
+ include Spaceship::ConnectAPI::Model
8
+
9
+ attr_accessor :contact_first_name
10
+ attr_accessor :contact_last_name
11
+ attr_accessor :contact_phone
12
+ attr_accessor :contact_email
13
+ attr_accessor :demo_account_name
14
+ attr_accessor :demo_account_password
15
+ attr_accessor :demo_account_required
16
+ attr_accessor :notes
17
+
18
+ attr_mapping({
19
+ "contactFirstName" => "contact_first_name",
20
+ "contactLastName" => "contact_last_name",
21
+ "contactPhone" => "contact_phone",
22
+ "contactEmail" => "contact_email",
23
+ "demoAccountName" => "demo_account_name",
24
+ "demoAccountPassword" => "demo_account_password",
25
+ "demoAccountRequired" => "demo_account_required",
26
+ "notes" => "notes"
27
+ })
28
+
29
+ def self.type
30
+ return "appStoreReviewDetails"
31
+ end
32
+
33
+ #
34
+ # API
35
+ #
36
+
37
+ def fetch_app_review_attachments
38
+ resp = Spaceship::ConnectAPI.get_app_review_attachments(app_store_review_detail_id: id)
39
+ return resp.to_models
40
+ end
41
+
42
+ def update(attributes: nil)
43
+ return Spaceship::ConnectAPI.patch_app_store_review_detail(app_store_review_detail_id: id, attributes: attributes)
44
+ end
45
+
46
+ def upload_attachment(path: nil)
47
+ return Spaceship::ConnectAPI::AppReviewAttachment.create(app_store_review_detail_id: id, path: path)
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,182 @@
1
+ require_relative '../model'
2
+ require_relative './app_store_version_localization'
3
+
4
+ module Spaceship
5
+ class ConnectAPI
6
+ class AppStoreVersion
7
+ include Spaceship::ConnectAPI::Model
8
+
9
+ attr_accessor :platform
10
+ attr_accessor :version_string
11
+ attr_accessor :app_store_state
12
+ attr_accessor :store_icon
13
+ attr_accessor :watch_store_icon
14
+ attr_accessor :copyright
15
+ attr_accessor :release_type
16
+ attr_accessor :earliest_release_date # 2020-06-17T12:00:00-07:00
17
+ attr_accessor :uses_idfa
18
+ attr_accessor :is_watch_only
19
+ attr_accessor :downloadable
20
+ attr_accessor :created_date
21
+
22
+ module AppStoreState
23
+ READY_FOR_SALE = "READY_FOR_SALE"
24
+ WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
25
+ DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
26
+ REJECTED = "REJECTED"
27
+ PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
28
+ METADATA_REJECTED = "METADATA_REJECTED"
29
+ end
30
+
31
+ module ReleaseType
32
+ AFTER_APPROVAL = "AFTER_APPROVAL"
33
+ MANUAL = "MANUAL"
34
+ SCHEDULED = "SCHEDULED"
35
+ end
36
+
37
+ attr_mapping({
38
+ "platform" => "platform",
39
+ "versionString" => "version_string",
40
+ "appStoreState" => "app_store_state",
41
+ "storeIcon" => "store_icon",
42
+ "watchStoreIcon" => "watch_store_icon",
43
+ "copyright" => "copyright",
44
+ "releaseType" => "release_type",
45
+ "earliestReleaseDate" => "earliest_release_date",
46
+ "usesIdfa" => "uses_idfa",
47
+ "isWatchOnly" => "is_watch_only",
48
+ "downloadable" => "downloadable",
49
+ "createdDate" => "created_date"
50
+ })
51
+
52
+ def self.type
53
+ return "appStoreVersions"
54
+ end
55
+
56
+ #
57
+ # API
58
+ #
59
+
60
+ # app,routingAppCoverage,resetRatingsRequest,appStoreVersionSubmission,appStoreVersionPhasedRelease,ageRatingDeclaration,appStoreReviewDetail,idfaDeclaration,gameCenterConfiguration
61
+ def self.get(app_store_version_id: nil, includes: nil, limit: nil, sort: nil)
62
+ return Spaceship::ConnectAPI.get_app_store_version(
63
+ app_store_version_id: app_store_version_id,
64
+ includes: includes
65
+ ).first
66
+ end
67
+
68
+ def update(attributes: nil)
69
+ return Spaceship::ConnectAPI.patch_app_store_version(app_store_version_id: id, attributes: attributes).first
70
+ end
71
+
72
+ #
73
+ # Age Rating Delcaration
74
+ #
75
+
76
+ def fetch_age_rating_declaration
77
+ resp = Spaceship::ConnectAPI.get_age_rating_declaration(app_store_version_id: id)
78
+ return resp.to_models.first
79
+ end
80
+
81
+ #
82
+ # App Store Version Localizations
83
+ #
84
+
85
+ def create_app_store_version_localization(attributes: nil)
86
+ resp = Spaceship::ConnectAPI.post_app_store_version_localization(app_store_version_id: id, attributes: attributes)
87
+ return resp.to_models.first
88
+ end
89
+
90
+ # appScreenshotSets,appPreviewSets
91
+ def get_app_store_version_localizations(filter: {}, includes: "appScreenshotSets", limit: nil, sort: nil)
92
+ filter ||= {}
93
+ filter["appStoreVersion"] = id
94
+ return Spaceship::ConnectAPI::AppStoreVersionLocalization.all(filter: filter, includes: includes, limit: limit, sort: sort)
95
+ end
96
+
97
+ #
98
+ # App Store Review Detail
99
+ #
100
+
101
+ def create_app_store_review_detail(attributes: nil)
102
+ resp = Spaceship::ConnectAPI.post_app_store_review_detail(app_store_version_id: id, attributes: attributes)
103
+ return resp.to_models.first
104
+ end
105
+
106
+ def fetch_app_store_review_detail
107
+ resp = Spaceship::ConnectAPI.get_app_store_review_detail(app_store_version_id: id)
108
+ return resp.to_models.first
109
+ end
110
+
111
+ #
112
+ # App Store Version Phased Releases
113
+ #
114
+
115
+ def fetch_app_store_version_phased_release
116
+ resp = Spaceship::ConnectAPI.get_app_store_version_phased_release(app_store_version_id: id)
117
+ return resp.to_models.first
118
+ end
119
+
120
+ def create_app_store_version_phased_release(attributes: nil)
121
+ resp = Spaceship::ConnectAPI.post_app_store_version_phased_release(app_store_version_id: id, attributes: attributes)
122
+ return resp.to_models.first
123
+ end
124
+
125
+ #
126
+ # App Store Version Submissions
127
+ #
128
+
129
+ def fetch_app_store_version_submission
130
+ resp = Spaceship::ConnectAPI.get_app_store_version_submission(app_store_version_id: id)
131
+ return resp.to_models.first
132
+ end
133
+
134
+ def create_app_store_version_submission
135
+ resp = Spaceship::ConnectAPI.post_app_store_version_submission(app_store_version_id: id)
136
+ return resp.to_models.first
137
+ end
138
+
139
+ #
140
+ # Build
141
+ #
142
+
143
+ def get_build(build_id: nil)
144
+ resp = Spaceship::ConnectAPI.get_build(app_store_version_id: id, build_id: build_id)
145
+ return resp.to_models.first
146
+ end
147
+
148
+ def select_build(build_id: nil)
149
+ resp = Spaceship::ConnectAPI.patch_app_store_version_with_build(app_store_version_id: id, build_id: build_id)
150
+ return resp.to_models.first
151
+ end
152
+
153
+ #
154
+ # IDFA Declarations
155
+ #
156
+
157
+ def fetch_idfa_declaration
158
+ resp = Spaceship::ConnectAPI.get_idfa_declaration(app_store_version_id: id)
159
+ return resp.to_models.first
160
+ end
161
+
162
+ def create_idfa_declaration(attributes: nil)
163
+ resp = Spaceship::ConnectAPI.post_idfa_declaration(app_store_version_id: id, attributes: attributes)
164
+ return resp.to_models.first
165
+ end
166
+
167
+ #
168
+ # Reset Ratings Requests
169
+ #
170
+
171
+ def fetch_reset_ratings_request
172
+ resp = Spaceship::ConnectAPI.get_reset_ratings_request(app_store_version_id: id)
173
+ return resp.to_models.first
174
+ end
175
+
176
+ def create_reset_ratings_request
177
+ resp = Spaceship::ConnectAPI.post_reset_ratings_request(app_store_version_id: id)
178
+ return resp.to_models.first
179
+ end
180
+ end
181
+ end
182
+ end