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 +4 -4
- data/lib/assets/summary.html.erb +4 -0
- data/lib/deliver/commands_generator.rb +2 -6
- data/lib/deliver/options.rb +5 -2
- data/lib/deliver/upload_screenshots.rb +23 -17
- data/lib/deliver/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba7ef6b0388c723334b0b3b3786b3aac99e6454d
|
4
|
+
data.tar.gz: f08295d5d15139cf08730005910787e48eebf6c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 407caabc47fa81c10fb076a1ed5a2ff77cc7979836451edadc540f6f107b132f039f205a29fe39ee9ece5002b900f84eea1490ca3e283381fb1dad250c761547
|
7
|
+
data.tar.gz: 8703f878e7cf420e754c2b4cc60d04b087570a72496cff2cae79adacf73445c6ee69caf6c532e9fabc27634a6711407050fb8c20698357900db72bcbf493793d
|
data/lib/assets/summary.html.erb
CHANGED
@@ -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
|
data/lib/deliver/options.rb
CHANGED
@@ -4,12 +4,15 @@ require 'credentials_manager'
|
|
4
4
|
module Deliver
|
5
5
|
class Options
|
6
6
|
def self.available_options
|
7
|
-
|
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:
|
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
|
-
|
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
|
-
|
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
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
-
|
45
|
-
|
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
|
|
data/lib/deliver/version.rb
CHANGED
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.
|
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
|
+
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
|
+
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.
|
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
|
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
|
80
|
+
version: '1.6'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: plist
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|