deliver 0.13.3 → 0.13.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cd6fde6a668140cc586e2a4f601a5270016a525
4
- data.tar.gz: dc7de78ed44f13b98b5a67f632f517fa19ab5ccc
3
+ metadata.gz: a65438668055954a4d000a5576168476bd6e941b
4
+ data.tar.gz: 0dce1693b8ac13639ece621d93e925e180d162fa
5
5
  SHA512:
6
- metadata.gz: b002a8b44879414b952d2f663b2f588358c0615dd6f41756c747ae42f5090364980cd4b9fe015aa4fb71ac1577c9c98283b8f93a025cdae955dbf8b6dfcf5363
7
- data.tar.gz: b4f2feadd4c2b14159ae84647940a7d92818c3ff9f458f2f61d23d44c82e8e2b58fbe5472cae8c2dff02078ca0aadaf5972382347d05b22a5435b930d5d259ba
6
+ metadata.gz: 1d63eeaf2a5cbc0787a634396c63f0e03527ca95b4da25e77b74fb4dd44ff4bfd740f7d54cc5cc4bb77295e06e8b09a85300ebb3123617f4a0213f53beba55c6
7
+ data.tar.gz: 244b66eea1d2ab780b1f9bdded7e26115161a97e1bead9c3557a9bd56d2e2dcd9c1db11be51f9631c93eac11323a18950388d1cc9504770eaa293afc09ee2c24
data/README.md CHANGED
@@ -329,7 +329,7 @@ Before actually uploading anything to iTunes, ```deliver``` will generate a [PDF
329
329
 
330
330
  ## Available language codes
331
331
  ```ruby
332
- ["da-DK", "de-DE", "el-GR", "en-AU", "en-CA", "en-GB", "en-US", "es-ES", "es-MX", "fi-FI", "fr-CA", "fr-FR", "id-ID", "it-IT", "ja-JP", "ko-KR", "ms-MY", "nl-NL", "no-NO", "pt-BR", "pt-PT", "ru-RU", "sv-SE", "th-TH", "tr-TR", "vi-VI", "cmn-Hans", "cmn-Hant"]
332
+ "da", "de-DE", "el", "en-AU", "en-CA", "en-GB", "en-US", "es-ES", "es-MX", "fi", "fr-CA", "fr-FR", "id", "it", "ja", "ko", "ms", "nl", "no", "pt-BR", "pt-PT", "ru", "sv", "th", "tr", "vi", "zh-Hans", "zh-Hant"
333
333
  ```
334
334
 
335
335
  ## Use a clean status bar
@@ -27,4 +27,4 @@ version "[[APP_VERSION]]"
27
27
 
28
28
  app_identifier "[[APP_IDENTIFIER]]" # The bundle identifier of your app
29
29
  apple_id "[[APPLE_ID]]" # This is NOT your Apple login ID, but the App ID of your app
30
- email "[[EMAIL]]" # the login email address
30
+ email "[[EMAIL]]" # the login email address
@@ -193,6 +193,10 @@ module Deliver
193
193
  update_localized_value('keywords', hash) do |field, keywords, language|
194
194
  raise AppMetadataParameterError.new("Parameter needs to be a hash (each language) with an array of keywords in it (given: #{hash})") unless keywords.kind_of?Array
195
195
 
196
+ next unless information
197
+ next unless information[language]
198
+ next unless information[language][:keywords]
199
+
196
200
  if not information[language][:keywords] or keywords.sort != information[language][:keywords][:value].sort
197
201
  field.children.remove # remove old keywords
198
202
 
@@ -306,12 +310,21 @@ module Deliver
306
310
 
307
311
  # Run through all the locales given by the 'user'
308
312
  new_value.each do |language, value|
309
- create_locale_if_not_exists(language)
313
+ # First, check if this is the legacy locale notation
314
+ unless FastlaneCore::Languages::ALL_LANGUAGES.include?language
315
+ # Check if we need to support legacy language codes
316
+ short_code = language.match(/(\w\w)\-.*/)
317
+ if short_code and short_code.length == 2 and FastlaneCore::Languages::ALL_LANGUAGES.include?short_code[1]
318
+ language = short_code[1]
319
+ else
320
+ raise AppMetadataParameterError.new("#{INVALID_LANGUAGE_ERROR} (#{language})")
321
+ end
322
+ end
310
323
 
311
- locale = fetch_value("//x:locale[@name='#{language}']").first
312
324
 
313
- raise AppMetadataParameterError.new("#{INVALID_LANGUAGE_ERROR} (#{language})") unless FastlaneCore::Languages::ALL_LANGUAGES.include?language
325
+ create_locale_if_not_exists(language)
314
326
 
327
+ locale = fetch_value("//x:locale[@name='#{language}']").first
315
328
 
316
329
  field = locale.search(xpath_name).first
317
330
 
@@ -351,7 +364,6 @@ module Deliver
351
364
 
352
365
  # Cleans up the package of stuff we do not want to modify/upload
353
366
  def clean_package
354
-
355
367
  # Remove the live version (if it exists)
356
368
  versions = fetch_value("//x:version")
357
369
  while versions.count > 1
@@ -367,6 +379,16 @@ module Deliver
367
379
  fetch_value("//x:in_app_purchases").remove
368
380
 
369
381
  fetch_value("//x:software_screenshots").remove
382
+
383
+ # Change the Chinese locale
384
+ # Radar 22548000
385
+ # from zh-Hans to cmn-Hans
386
+ chinese = []
387
+ chinese << fetch_value("//x:locale[@name='zh-Hant']").last
388
+ chinese << fetch_value("//x:locale[@name='zh-Hans']").last
389
+ chinese.each do |entry|
390
+ entry["name"] = entry["name"].gsub("zh", "cmn") if entry && entry["name"]
391
+ end
370
392
  end
371
393
 
372
394
  # This will fill in all information we got (from the downloaded metadata.xml file) into self.information
@@ -150,7 +150,7 @@ module Deliver
150
150
 
151
151
  found = false
152
152
  FastlaneCore::Languages::ALL_LANGUAGES.each do |language|
153
- full_path = path + "/#{language}"
153
+ full_path = File.join(path, language)
154
154
  if File.directory?(full_path)
155
155
  found = true
156
156
  set_screenshots_for_each_language({
@@ -158,6 +158,31 @@ module Deliver
158
158
  }, use_framed)
159
159
  end
160
160
  end
161
+
162
+ # Legacy:
163
+ # We also want to support the "legacy" language format (ja-JP instead of just ja)
164
+ FastlaneCore::Languages::ALL_LANGUAGES_LEGACY.each do |language|
165
+ full_path = File.join(path, language)
166
+ if File.directory?(full_path)
167
+
168
+ if FastlaneCore::Languages::ALL_LANGUAGES.include?language
169
+ # We're all good, this language code is still supported
170
+ else
171
+ # This language code was changed - need to modify that
172
+ short_code = language.match(/(\w\w)\-.*/)
173
+ if short_code and short_code.length == 2
174
+ Helper.log.info "Using language code #{short_code[1]} instead of #{language}"
175
+ language = short_code[1]
176
+ end
177
+ end
178
+
179
+ found = true
180
+ set_screenshots_for_each_language({
181
+ language => full_path
182
+ }, use_framed)
183
+ end
184
+ end
185
+
161
186
  return found
162
187
  end
163
188
  end
@@ -77,7 +77,7 @@ module Deliver
77
77
  FileUtils.mkdir_p File.join(deliver_path, 'screenshots') # just in case the fetching didn't work
78
78
  File.write(File.join(deliver_path, 'screenshots', 'README.txt'), File.read("#{Helper.gem_path('deliver')}/lib/assets/ScreenshotsHelp"))
79
79
 
80
- Helper.log.info "Successfully created new Deliverfile at '#{file_path}'".green
80
+ Helper.log.info "Successfully created new Deliverfile".green
81
81
  end
82
82
 
83
83
  private
@@ -98,7 +98,7 @@ module Deliver
98
98
  Helper.log.info "Successfully downloaded existing metadata for language #{language}"
99
99
  end
100
100
 
101
- puts "Successfully created new configuration files at '#{File.join(path, 'metadata')}'".green
101
+ puts "Successfully created new configuration files.".green
102
102
 
103
103
  gem_path = Helper.gem_path('deliver')
104
104
 
@@ -198,16 +198,19 @@ module Deliver
198
198
  end
199
199
 
200
200
  def build_upload_command(username, password, source = "/tmp")
201
- [
201
+ parts = [
202
202
  '"' + Helper.transporter_path + '"',
203
203
  "-m upload",
204
204
  "-u \"#{username}\"",
205
205
  "-p '#{escaped_password(password)}'",
206
206
  "-f '#{source}'",
207
207
  ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"], # that's here, because the user might overwrite the -t option
208
- "-t 'Signiant'",
209
208
  "-k 100000"
210
- ].join(' ')
209
+ ]
210
+
211
+ parts << "-t 'Signiant'" unless parts.join(" ").include?"-t"
212
+
213
+ parts.join(' ')
211
214
  end
212
215
 
213
216
  def escaped_password(password)
@@ -1,3 +1,3 @@
1
1
  module Deliver
2
- VERSION = "0.13.3"
2
+ VERSION = "0.13.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deliver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-31 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.15.1
19
+ version: 0.15.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.15.1
26
+ version: 0.15.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: credentials_manager
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -273,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
273
273
  version: '0'
274
274
  requirements: []
275
275
  rubyforge_project:
276
- rubygems_version: 2.4.6
276
+ rubygems_version: 2.4.5
277
277
  signing_key:
278
278
  specification_version: 4
279
279
  summary: Upload screenshots, metadata and your app to the App Store using a single