fastlane 2.54.0.beta.20170821010003 → 2.54.0.beta.20170822010003
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/deliver/README.md +6 -2
- data/deliver/lib/deliver/detect_values.rb +14 -0
- data/deliver/lib/deliver/options.rb +8 -2
- data/deliver/lib/deliver/runner.rb +12 -5
- data/deliver/lib/deliver/upload_metadata.rb +55 -22
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/gym/lib/gym/code_signing_mapping.rb +32 -5
- data/snapshot/lib/snapshot/setup.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32ceeaf72e899a6e33a12cf6218061c5b9297f3a
|
4
|
+
data.tar.gz: 4c6121a674608a8268e8354281519077e37cd699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ec6be6e424f85fd7d7fc4619fff8c6bf86027329f95ea680c2f8f8bf478d0c486ec1029d61bc8b789eb10f1a1d03bdc38f15783c2cb2463e915f69c20a25543
|
7
|
+
data.tar.gz: dc9b54ddd7e1817bc6811d494887cd12d2c07795ce6062f02fe31b14f3a9e3fe663de00a2e4b16ad58baeecce82fb33fa596472ab267478a7b6e1c67cd2c8cbc
|
data/deliver/README.md
CHANGED
@@ -195,11 +195,15 @@ no, en-US, en-CA, fi, ru, zh-Hans, nl-NL, zh-Hant, en-AU, id, de-DE, sv, ko, ms,
|
|
195
195
|
|
196
196
|
Deliver has a special `default` language code which allows you to provide values that are not localised, and which will be used as defaults when you don’t provide a specific localised value.
|
197
197
|
|
198
|
-
|
198
|
+
In order to use `default`, you will need to tell `deliver` which languages your app uses. You can do this in either of two ways:
|
199
|
+
1. Create the folders named with the language in the metadata folder (i.e. fastlane/metadata/en-US or fastlane/metadata/de-DE)
|
200
|
+
2. Add the following to your `Deliverfile` `languages(['en-US','de-DE'])`
|
201
|
+
|
202
|
+
You can use this either in json within your `Deliverfile` and/or as folders in your metadata folder. `deliver` will take the union of both language sets from the `Deliverfile` and from the metadata folder and create on single set of languages which will be enabled.
|
199
203
|
|
200
204
|
Imagine that you have localised data for the following language codes: ```en-US, de-DE, el, it```
|
201
205
|
|
202
|
-
You can set the following in your
|
206
|
+
You can set the following in your `Deliverfile`
|
203
207
|
|
204
208
|
```ruby
|
205
209
|
release_notes({
|
@@ -7,6 +7,8 @@ module Deliver
|
|
7
7
|
find_folders(options)
|
8
8
|
ensure_folders_created(options)
|
9
9
|
find_version(options) unless skip_params[:skip_version]
|
10
|
+
|
11
|
+
verify_languages!(options)
|
10
12
|
end
|
11
13
|
|
12
14
|
def find_app_identifier(options)
|
@@ -67,5 +69,17 @@ module Deliver
|
|
67
69
|
options[:platform] = 'osx'
|
68
70
|
end
|
69
71
|
end
|
72
|
+
|
73
|
+
def verify_languages!(options)
|
74
|
+
languages = options[:languages]
|
75
|
+
return unless languages
|
76
|
+
|
77
|
+
all_languages = Spaceship::Tunes.client.available_languages
|
78
|
+
diff = languages - all_languages
|
79
|
+
|
80
|
+
unless diff.empty?
|
81
|
+
UI.user_error!("The following languages are invalid and cannot be activated: #{diff.join(',')}\n\nValid languages are: #{all_languages}")
|
82
|
+
end
|
83
|
+
end
|
70
84
|
end
|
71
85
|
end
|
@@ -284,7 +284,7 @@ module Deliver
|
|
284
284
|
keywords = keywords.join(", ") if keywords.kind_of?(Array)
|
285
285
|
value[language] = keywords
|
286
286
|
|
287
|
-
UI.user_error!("
|
287
|
+
UI.user_error!("keywords must be a hash with all values being strings") unless keywords.kind_of?(String)
|
288
288
|
end
|
289
289
|
end),
|
290
290
|
FastlaneCore::ConfigItem.new(key: :promotional_text,
|
@@ -309,7 +309,13 @@ module Deliver
|
|
309
309
|
FastlaneCore::ConfigItem.new(key: :marketing_url,
|
310
310
|
description: "Metadata: Localised marketing url",
|
311
311
|
optional: true,
|
312
|
-
is_string: false)
|
312
|
+
is_string: false),
|
313
|
+
# The verify_block has been removed from here and verification now happens in Deliver::DetectValues
|
314
|
+
# Verification needed Spaceship::Tunes.client which required the Deliver::Runner to already by started
|
315
|
+
FastlaneCore::ConfigItem.new(key: :languages,
|
316
|
+
description: "Metadata: List of languages to activate",
|
317
|
+
type: Array,
|
318
|
+
optional: true)
|
313
319
|
]
|
314
320
|
end
|
315
321
|
end
|
@@ -6,7 +6,9 @@ module Deliver
|
|
6
6
|
|
7
7
|
def initialize(options, skip_auto_detection = {})
|
8
8
|
self.options = options
|
9
|
+
|
9
10
|
login
|
11
|
+
|
10
12
|
Deliver::DetectValues.new.run!(self.options, skip_auto_detection)
|
11
13
|
FastlaneCore::PrintTable.print_values(config: options, hide_keys: [:app], mask_keys: ['app_review_information.demo_password'], title: "deliver #{Fastlane::VERSION} Summary")
|
12
14
|
end
|
@@ -86,10 +88,15 @@ module Deliver
|
|
86
88
|
|
87
89
|
# Upload all metadata, screenshots, pricing information, etc. to iTunes Connect
|
88
90
|
def upload_metadata
|
91
|
+
upload_metadata = UploadMetadata.new
|
92
|
+
upload_screenshots = UploadScreenshots.new
|
93
|
+
|
89
94
|
# First, collect all the things for the HTML Report
|
90
|
-
screenshots =
|
91
|
-
|
92
|
-
|
95
|
+
screenshots = upload_screenshots.collect_screenshots(options)
|
96
|
+
upload_metadata.load_from_filesystem(options)
|
97
|
+
|
98
|
+
# Assign "default" values to all languages
|
99
|
+
upload_metadata.assign_defaults(options)
|
93
100
|
|
94
101
|
# Handle app icon / watch icon
|
95
102
|
prepare_app_icons(options)
|
@@ -98,8 +105,8 @@ module Deliver
|
|
98
105
|
validate_html(screenshots)
|
99
106
|
|
100
107
|
# Commit
|
101
|
-
|
102
|
-
|
108
|
+
upload_metadata.upload(options)
|
109
|
+
upload_screenshots.upload(options, screenshots)
|
103
110
|
UploadPriceTier.new.upload(options)
|
104
111
|
UploadAssets.new.upload(options) # e.g. app icon
|
105
112
|
end
|
@@ -140,25 +140,11 @@ module Deliver
|
|
140
140
|
|
141
141
|
# If the user is using the 'default' language, then assign values where they are needed
|
142
142
|
def assign_defaults(options)
|
143
|
-
#
|
144
|
-
|
145
|
-
|
146
|
-
# Get all languages used in existing settings
|
147
|
-
(LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
|
148
|
-
current = options[key]
|
149
|
-
next unless current && current.kind_of?(Hash)
|
150
|
-
current.each do |language, value|
|
151
|
-
enabled_languages << language unless enabled_languages.include?(language)
|
152
|
-
end
|
153
|
-
end
|
154
|
-
|
155
|
-
# Check folder list (an empty folder signifies a language is required)
|
156
|
-
Loader.language_folders(options[:metadata_path]).each do |lng_folder|
|
157
|
-
next unless File.directory?(lng_folder) # We don't want to read txt as they are non localised
|
143
|
+
# Normalizes languages keys from symbols to strings
|
144
|
+
normalize_language_keys(options)
|
158
145
|
|
159
|
-
|
160
|
-
|
161
|
-
end
|
146
|
+
# Build a complete list of the required languages
|
147
|
+
enabled_languages = detect_languages(options)
|
162
148
|
|
163
149
|
return unless enabled_languages.include?("default")
|
164
150
|
UI.message("Detected languages: " + enabled_languages.to_s)
|
@@ -180,6 +166,33 @@ module Deliver
|
|
180
166
|
end
|
181
167
|
end
|
182
168
|
|
169
|
+
def detect_languages(options)
|
170
|
+
# Build a complete list of the required languages
|
171
|
+
enabled_languages = options[:languages] || []
|
172
|
+
|
173
|
+
# Get all languages used in existing settings
|
174
|
+
(LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
|
175
|
+
current = options[key]
|
176
|
+
next unless current && current.kind_of?(Hash)
|
177
|
+
current.each do |language, value|
|
178
|
+
enabled_languages << language unless enabled_languages.include?(language)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Check folder list (an empty folder signifies a language is required)
|
183
|
+
Loader.language_folders(options[:metadata_path]).each do |lang_folder|
|
184
|
+
next unless File.directory?(lang_folder) # We don't want to read txt as they are non localised
|
185
|
+
|
186
|
+
language = File.basename(lang_folder)
|
187
|
+
enabled_languages << language unless enabled_languages.include?(language)
|
188
|
+
end
|
189
|
+
|
190
|
+
# Mapping to strings because :default symbol can be passed in
|
191
|
+
enabled_languages
|
192
|
+
.map(&:to_s)
|
193
|
+
.uniq
|
194
|
+
end
|
195
|
+
|
183
196
|
# Makes sure all languages we need are actually created
|
184
197
|
def verify_available_languages!(options)
|
185
198
|
return if options[:skip_metadata]
|
@@ -190,7 +203,7 @@ module Deliver
|
|
190
203
|
v = options[:app].edit_version
|
191
204
|
UI.user_error!("Could not find a version to edit for app '#{options[:app].name}', the app metadata is read-only currently") unless v
|
192
205
|
|
193
|
-
enabled_languages = []
|
206
|
+
enabled_languages = options[:languages] || []
|
194
207
|
LOCALISED_VERSION_VALUES.each do |key|
|
195
208
|
current = options[key]
|
196
209
|
next unless current && current.kind_of?(Hash)
|
@@ -200,6 +213,12 @@ module Deliver
|
|
200
213
|
end
|
201
214
|
end
|
202
215
|
|
216
|
+
# Reject "default" language from getting enabled
|
217
|
+
# because "default" is not an iTC language
|
218
|
+
enabled_languages = enabled_languages.reject do |lang|
|
219
|
+
lang == "default"
|
220
|
+
end.uniq
|
221
|
+
|
203
222
|
if enabled_languages.count > 0
|
204
223
|
v.create_languages(enabled_languages)
|
205
224
|
lng_text = "language"
|
@@ -215,10 +234,10 @@ module Deliver
|
|
215
234
|
return if options[:skip_metadata]
|
216
235
|
|
217
236
|
# Load localised data
|
218
|
-
Loader.language_folders(options[:metadata_path]).each do |
|
219
|
-
language = File.basename(
|
237
|
+
Loader.language_folders(options[:metadata_path]).each do |lang_folder|
|
238
|
+
language = File.basename(lang_folder)
|
220
239
|
(LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
|
221
|
-
path = File.join(
|
240
|
+
path = File.join(lang_folder, "#{key}.txt")
|
222
241
|
next unless File.exist?(path)
|
223
242
|
|
224
243
|
UI.message("Loading '#{path}'...")
|
@@ -261,6 +280,20 @@ module Deliver
|
|
261
280
|
|
262
281
|
private
|
263
282
|
|
283
|
+
# Normalizes languages keys from symbols to strings
|
284
|
+
def normalize_language_keys(options)
|
285
|
+
(LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|
|
286
|
+
current = options[key]
|
287
|
+
next unless current && current.kind_of?(Hash)
|
288
|
+
|
289
|
+
current.keys.each do |language|
|
290
|
+
current[language.to_s] = current.delete(language)
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
options
|
295
|
+
end
|
296
|
+
|
264
297
|
def set_trade_representative_contact_information(v, options)
|
265
298
|
return unless options[:trade_representative_contact_information]
|
266
299
|
info = options[:trade_representative_contact_information]
|
@@ -17,6 +17,9 @@ module Gym
|
|
17
17
|
final_mapping = (primary_mapping || {}).dup # for verbose output at the end of the method
|
18
18
|
secondary_mapping ||= self.detect_project_profile_mapping # default to Xcode project
|
19
19
|
|
20
|
+
final_mapping = Hash[final_mapping.map { |k, v| [k.to_sym, v] }]
|
21
|
+
secondary_mapping = Hash[secondary_mapping.map { |k, v| [k.to_sym, v] }]
|
22
|
+
|
20
23
|
# Now it's time to merge the (potentially) existing mapping
|
21
24
|
# (e.g. coming from `provisioningProfiles` of the `export_options` or from previous match calls)
|
22
25
|
# with the secondary hash we just created (or was provided as parameter).
|
@@ -103,26 +106,50 @@ module Gym
|
|
103
106
|
|
104
107
|
def detect_project_profile_mapping
|
105
108
|
provisioning_profile_mapping = {}
|
109
|
+
specified_configuration = Gym.config[:configuration] || Gym.project.default_build_settings(key: "CONFIGURATION")
|
106
110
|
|
107
111
|
self.project_paths.each do |project_path|
|
108
112
|
UI.verbose("Parsing project file '#{project_path}' to find selected provisioning profiles")
|
113
|
+
UI.verbose("Finding provision profiles for '#{specified_configuration}'") if specified_configuration
|
109
114
|
|
110
115
|
begin
|
116
|
+
# Storing bundle identifiers with duplicate profiles
|
117
|
+
# for informing user later on
|
118
|
+
bundle_identifiers_with_duplicates = []
|
119
|
+
|
111
120
|
project = Xcodeproj::Project.open(project_path)
|
112
121
|
project.targets.each do |target|
|
113
122
|
target.build_configuration_list.build_configurations.each do |build_configuration|
|
114
123
|
current = build_configuration.build_settings
|
115
124
|
next if test_target?(current)
|
125
|
+
next unless specified_configuration == build_configuration.name
|
126
|
+
|
127
|
+
bundle_identifier = build_configuration.resolve_build_setting("PRODUCT_BUNDLE_IDENTIFIER")
|
128
|
+
provisioning_profile_specifier = build_configuration.resolve_build_setting("PROVISIONING_PROFILE_SPECIFIER")
|
129
|
+
provisioning_profile_uuid = build_configuration.resolve_build_setting("PROVISIONING_PROFILE")
|
130
|
+
|
131
|
+
has_profile_specifier = provisioning_profile_specifier.to_s.length > 0
|
132
|
+
has_profile_uuid = provisioning_profile_uuid.to_s.length > 0
|
116
133
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
134
|
+
# Stores bundle identifiers that have already been mapped to inform user
|
135
|
+
if provisioning_profile_mapping[bundle_identifier] && (has_profile_specifier || has_profile_uuid)
|
136
|
+
bundle_identifiers_with_duplicates << bundle_identifier
|
137
|
+
end
|
138
|
+
|
139
|
+
# Creates the mapping for a bundle identifier and profile specifier/uuid
|
140
|
+
if has_profile_specifier
|
121
141
|
provisioning_profile_mapping[bundle_identifier] = provisioning_profile_specifier
|
122
|
-
elsif
|
142
|
+
elsif has_profile_uuid
|
123
143
|
provisioning_profile_mapping[bundle_identifier] = provisioning_profile_uuid
|
124
144
|
end
|
125
145
|
end
|
146
|
+
|
147
|
+
# Alerting user to explicitly specify a mapping if cannot be determined
|
148
|
+
next if bundle_identifiers_with_duplicates.empty?
|
149
|
+
UI.error("Couldn't automatically detect the provisioning profile mapping")
|
150
|
+
UI.error("There were multiple profiles for bundle identifier(s): #{bundle_identifiers_with_duplicates.uniq.join(', ')}")
|
151
|
+
UI.error("You need to provide an explicit mapping of what provisioning")
|
152
|
+
UI.error("profile to use for each bundle identifier of your app")
|
126
153
|
end
|
127
154
|
rescue => ex
|
128
155
|
# We catch errors here, as we might run into an exception on one included project
|
@@ -5,7 +5,7 @@ module Snapshot
|
|
5
5
|
snapfile_path = File.join(path, 'Snapfile')
|
6
6
|
|
7
7
|
if File.exist?(snapfile_path)
|
8
|
-
UI.user_error!("Snapfile already exists at path '#{snapfile_path}'. Run 'snapshot' to
|
8
|
+
UI.user_error!("Snapfile already exists at path '#{snapfile_path}'. Run 'fastlane snapshot' to generate screenshots.")
|
9
9
|
end
|
10
10
|
|
11
11
|
File.write(snapfile_path, File.read("#{Snapshot::ROOT}/lib/assets/SnapfileTemplate"))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.54.0.beta.
|
4
|
+
version: 2.54.0.beta.20170822010003
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2017-08-
|
18
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: slack-notifier
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.
|
46
|
+
version: 1.5.0
|
47
47
|
- - "<"
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: 2.0.0
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 1.
|
56
|
+
version: 1.5.0
|
57
57
|
- - "<"
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 2.0.0
|