deliver 1.5.1 → 1.5.2

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: 096aa98aed262deef2e031a6fa9c9d27eb7dafad
4
- data.tar.gz: 80423da9231b1bf09e0acdd6957778f1895240a3
3
+ metadata.gz: ba7ef6b0388c723334b0b3b3786b3aac99e6454d
4
+ data.tar.gz: f08295d5d15139cf08730005910787e48eebf6c6
5
5
  SHA512:
6
- metadata.gz: 0accb6655c8ee4e1b2e38a9c4e1ccf16b30bd995e21b4d856c9c3bd10c3db8db05e7fb761ade25728ed9d65383cf0fea633980a478c7403682c87cd45317f21b
7
- data.tar.gz: 71d0e820ef9146fa06867b2e72be39866f023ff29d379e147a14558e12a8e3e030904cb89d989750bf816faf4e3d66df2136f9197c8f90026e88c59f8bffd316
6
+ metadata.gz: 407caabc47fa81c10fb076a1ed5a2ff77cc7979836451edadc540f6f107b132f039f205a29fe39ee9ece5002b900f84eea1490ca3e283381fb1dad250c761547
7
+ data.tar.gz: 8703f878e7cf420e754c2b4cc60d04b087570a72496cff2cae79adacf73445c6ee69caf6c532e9fabc27634a6711407050fb8c20698357900db72bcbf493793d
@@ -115,6 +115,10 @@
115
115
  <div id="app-name">
116
116
  <%= language %>: <%= @options[:name][language] %>
117
117
  </div>
118
+ <% else %>
119
+ <div id="app-name">
120
+ <%= language %>
121
+ </div>
118
122
  <% end %>
119
123
 
120
124
  <div id="app-urls">
@@ -74,9 +74,7 @@ module Deliver
74
74
  options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
75
75
  options.load_configuration_file("Deliverfile")
76
76
  Deliver::Runner.new(options) # to login...
77
-
78
- path = (FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.')
79
-
77
+ path = options[:screenshots_path] || (FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.')
80
78
  Deliver::DownloadScreenshots.run(options, path)
81
79
  end
82
80
  end
@@ -89,9 +87,7 @@ module Deliver
89
87
  options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
90
88
  options.load_configuration_file("Deliverfile")
91
89
  Deliver::Runner.new(options) # to login...
92
-
93
- path = (FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.')
94
-
90
+ path = options[:metadata_path] || (FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.')
95
91
  res = ENV["DELIVER_FORCE_OVERWRITE"]
96
92
  res ||= agree("Do you want to overwrite existing metadata on path '#{File.expand_path(path)}/metadata'? (y/n)", true)
97
93
  if res
@@ -4,12 +4,15 @@ require 'credentials_manager'
4
4
  module Deliver
5
5
  class Options
6
6
  def self.available_options
7
- @options ||= [
7
+ user = CredentialsManager::AppfileConfig.try_fetch_value(:itunes_connect_id)
8
+ user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
9
+
10
+ [
8
11
  FastlaneCore::ConfigItem.new(key: :username,
9
12
  short_option: "-u",
10
13
  env_name: "DELIVER_USERNAME",
11
14
  description: "Your Apple ID Username",
12
- default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)),
15
+ default_value: user),
13
16
  FastlaneCore::ConfigItem.new(key: :app_identifier,
14
17
  short_option: "-a",
15
18
  env_name: "DELIVER_APP_IDENTIFIER",
@@ -22,27 +22,33 @@ module Deliver
22
22
 
23
23
  # Now, fill in the new ones
24
24
  indized = {} # per language and device type
25
- screenshots.each do |screenshot|
26
- indized[screenshot.language] ||= {}
27
- indized[screenshot.language][screenshot.device_type] ||= 0
28
- indized[screenshot.language][screenshot.device_type] += 1 # we actually start with 1... wtf iTC
29
25
 
30
- index = indized[screenshot.language][screenshot.device_type]
26
+ screenshots_per_language = screenshots.group_by(&:language)
27
+ screenshots_per_language.each do |language, screenshots_for_language|
28
+ Helper.log.info "Uploading #{screenshots_for_language.length} screenshots for language #{language}"
29
+ screenshots_for_language.each do |screenshot|
30
+ indized[screenshot.language] ||= {}
31
+ indized[screenshot.language][screenshot.device_type] ||= 0
32
+ indized[screenshot.language][screenshot.device_type] += 1 # we actually start with 1... wtf iTC
31
33
 
32
- if index > 5
33
- Helper.log.error "Too many screenshots found for device '#{screenshot.device_type}' in '#{screenshot.language}'"
34
- next
35
- end
34
+ index = indized[screenshot.language][screenshot.device_type]
36
35
 
37
- Helper.log.info "Uploading '#{screenshot.path}'..."
38
- v.upload_screenshot!(screenshot.path,
39
- index,
40
- screenshot.language,
41
- screenshot.device_type)
42
- end
36
+ if index > 5
37
+ Helper.log.error "Too many screenshots found for device '#{screenshot.device_type}' in '#{screenshot.language}'"
38
+ next
39
+ end
43
40
 
44
- Helper.log.info "Saving changes"
45
- v.save!
41
+ Helper.log.info "Uploading '#{screenshot.path}'..."
42
+ v.upload_screenshot!(screenshot.path,
43
+ index,
44
+ screenshot.language,
45
+ screenshot.device_type)
46
+ end
47
+ # ideally we should only save once, but itunes server can't cope it seems
48
+ # so we save per language. See issue #349
49
+ Helper.log.info "Saving changes"
50
+ v.save!
51
+ end
46
52
  Helper.log.info "Successfully uploaded screenshots to iTunes Connect".green
47
53
  end
48
54
 
@@ -1,4 +1,4 @@
1
1
  module Deliver
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
3
3
  DESCRIPTION = 'Upload screenshots, metadata and your app to the App Store using a single command'
4
4
  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: 1.5.1
4
+ version: 1.5.2
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-11-12 00:00:00.000000000 Z
11
+ date: 2015-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.0
19
+ version: 0.26.4
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.19.0
29
+ version: 0.26.4
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.0
@@ -70,14 +70,14 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: 1.6.3
73
+ version: '1.6'
74
74
  type: :runtime
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: 1.6.3
80
+ version: '1.6'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: plist
83
83
  requirement: !ruby/object:Gem::Requirement