deliver 1.15.1 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/ScreenshotsHelp +4 -2
- data/lib/deliver/app_screenshot.rb +59 -1
- data/lib/deliver/detect_values.rb +13 -1
- data/lib/deliver/loader.rb +3 -2
- data/lib/deliver/options.rb +9 -0
- data/lib/deliver/runner.rb +2 -1
- data/lib/deliver/upload_assets.rb +1 -1
- data/lib/deliver/upload_metadata.rb +1 -1
- data/lib/deliver/upload_screenshots.rb +8 -7
- data/lib/deliver/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c99d8b6d17d2b023312440d362b54ac541e382c
|
4
|
+
data.tar.gz: 952141eed98bd4301bcb4703387ddf2e938cd897
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4075258ce3d1cbd13a7174ca217c8b021a3ce574cf33a2610dc3ac13a7fc2d9070b6a55737eb6bdc1854d5b259c52ae42101da84316f6b192c3d0b2cb3a1319e
|
7
|
+
data.tar.gz: f6a1a1a9532466ea270f7d92f904d10d086dfc0a1ef6184be65ddb8c20b7a65a74dbb5e787892609ebaded8d84582d8e529fe2d901127998dc2c6c6db2e5301a
|
data/lib/assets/ScreenshotsHelp
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
Put all screenshots you want to use inside the folder of its language (e.g. en-US).
|
2
2
|
The device type will automatically be recognized using the image resolution. Apple TV screenshots
|
3
|
-
should be stored in a subdirectory named appleTV with language folders inside of it.
|
3
|
+
should be stored in a subdirectory named appleTV with language folders inside of it. iMessage
|
4
|
+
screenshots, like Apple TV screenshots, should also be stored in a subdirectory named iMessage
|
5
|
+
with language folders inside of it.
|
4
6
|
|
5
|
-
The screenshots can be named whatever you want, but keep in mind they are sorted alphabetically.
|
7
|
+
The screenshots can be named whatever you want, but keep in mind they are sorted alphabetically.
|
@@ -17,6 +17,16 @@ module Deliver
|
|
17
17
|
IOS_IPAD = "iOS-iPad"
|
18
18
|
# iPad Pro
|
19
19
|
IOS_IPAD_PRO = "iOS-iPad-Pro"
|
20
|
+
# iPhone 5 iMessage
|
21
|
+
IOS_40_MESSAGES = "iOS-4-in-messages"
|
22
|
+
# iPhone 6 iMessage
|
23
|
+
IOS_47_MESSAGES = "iOS-4.7-in-messages"
|
24
|
+
# iPhone 6 Plus iMessage
|
25
|
+
IOS_55_MESSAGES = "iOS-5.5-in-messages"
|
26
|
+
# iPad iMessage
|
27
|
+
IOS_IPAD_MESSAGES = "iOS-iPad-messages"
|
28
|
+
# iPad Pro iMessage
|
29
|
+
IOS_IPAD_PRO_MESSAGES = "iOS-iPad-Pro-messages"
|
20
30
|
# Apple Watch
|
21
31
|
IOS_APPLE_WATCH = "iOS-Apple-Watch"
|
22
32
|
# Mac
|
@@ -56,6 +66,11 @@ module Deliver
|
|
56
66
|
ScreenSize::IOS_55 => "iphone6Plus",
|
57
67
|
ScreenSize::IOS_IPAD => "ipad",
|
58
68
|
ScreenSize::IOS_IPAD_PRO => "ipadPro",
|
69
|
+
ScreenSize::IOS_40_MESSAGES => "iphone4",
|
70
|
+
ScreenSize::IOS_47_MESSAGES => "iphone6",
|
71
|
+
ScreenSize::IOS_55_MESSAGES => "iphone6Plus",
|
72
|
+
ScreenSize::IOS_IPAD_MESSAGES => "ipad",
|
73
|
+
ScreenSize::IOS_IPAD_PRO_MESSAGES => "ipadPro",
|
59
74
|
ScreenSize::MAC => "desktop",
|
60
75
|
ScreenSize::IOS_APPLE_WATCH => "watch",
|
61
76
|
ScreenSize::APPLE_TV => "appleTV"
|
@@ -72,6 +87,11 @@ module Deliver
|
|
72
87
|
ScreenSize::IOS_55 => "iPhone 6 Plus",
|
73
88
|
ScreenSize::IOS_IPAD => "iPad",
|
74
89
|
ScreenSize::IOS_IPAD_PRO => "iPad Pro",
|
90
|
+
ScreenSize::IOS_40_MESSAGES => "iPhone 5 (iMessage)",
|
91
|
+
ScreenSize::IOS_47_MESSAGES => "iPhone 6 (iMessage)",
|
92
|
+
ScreenSize::IOS_55_MESSAGES => "iPhone 6 Plus (iMessage)",
|
93
|
+
ScreenSize::IOS_IPAD_MESSAGES => "iPad (iMessage)",
|
94
|
+
ScreenSize::IOS_IPAD_PRO_MESSAGES => "iPad Pro (iMessage)",
|
75
95
|
ScreenSize::MAC => "Mac",
|
76
96
|
ScreenSize::IOS_APPLE_WATCH => "Watch",
|
77
97
|
ScreenSize::APPLE_TV => "Apple TV"
|
@@ -86,6 +106,41 @@ module Deliver
|
|
86
106
|
return self.screen_size == self.class.calculate_screen_size(self.path)
|
87
107
|
end
|
88
108
|
|
109
|
+
def is_messages?
|
110
|
+
return [ScreenSize::IOS_40_MESSAGES, ScreenSize::IOS_47_MESSAGES, ScreenSize::IOS_55_MESSAGES, ScreenSize::IOS_IPAD_MESSAGES, ScreenSize::IOS_IPAD_PRO_MESSAGES].include?(self.screen_size)
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.device_messages
|
114
|
+
return {
|
115
|
+
ScreenSize::IOS_55_MESSAGES => [
|
116
|
+
[1080, 1920],
|
117
|
+
[1242, 2208]
|
118
|
+
],
|
119
|
+
ScreenSize::IOS_47_MESSAGES => [
|
120
|
+
[750, 1334]
|
121
|
+
],
|
122
|
+
ScreenSize::IOS_40_MESSAGES => [
|
123
|
+
[640, 1136],
|
124
|
+
[640, 1096],
|
125
|
+
[1136, 600] # landscape status bar is smaller
|
126
|
+
],
|
127
|
+
ScreenSize::IOS_IPAD_MESSAGES => [
|
128
|
+
[1024, 748],
|
129
|
+
[1024, 768],
|
130
|
+
[2048, 1496],
|
131
|
+
[2048, 1536],
|
132
|
+
[768, 1004],
|
133
|
+
[768, 1024],
|
134
|
+
[1536, 2008],
|
135
|
+
[1536, 2048]
|
136
|
+
],
|
137
|
+
ScreenSize::IOS_IPAD_PRO_MESSAGES => [
|
138
|
+
[2732, 2048],
|
139
|
+
[2048, 2732]
|
140
|
+
]
|
141
|
+
}
|
142
|
+
end
|
143
|
+
|
89
144
|
def self.devices
|
90
145
|
return {
|
91
146
|
ScreenSize::IOS_55 => [
|
@@ -145,7 +200,10 @@ module Deliver
|
|
145
200
|
skip_landscape = true
|
146
201
|
end
|
147
202
|
|
148
|
-
|
203
|
+
# iMessage screenshots have same resolution as app screenshots so we need to distinguish them
|
204
|
+
devices = path_component.eql?("iMessage") ? self.device_messages : self.devices
|
205
|
+
|
206
|
+
devices.each do |device_type, array|
|
149
207
|
array.each do |resolution|
|
150
208
|
if skip_landscape
|
151
209
|
if size[0] == resolution[0] and size[1] == resolution[1] # portrait
|
@@ -4,7 +4,9 @@ module Deliver
|
|
4
4
|
find_app_identifier(options)
|
5
5
|
find_app(options)
|
6
6
|
find_folders(options)
|
7
|
+
ensure_folders_created(options)
|
7
8
|
find_version(options) unless skip_params[:skip_version]
|
9
|
+
find_platform(options)
|
8
10
|
end
|
9
11
|
|
10
12
|
def find_app_identifier(options)
|
@@ -34,10 +36,12 @@ module Deliver
|
|
34
36
|
end
|
35
37
|
|
36
38
|
def find_folders(options)
|
37
|
-
containing = Helper.fastlane_enabled? ?
|
39
|
+
containing = Helper.fastlane_enabled? ? FastlaneCore::FastlaneFolder.path : '.'
|
38
40
|
options[:screenshots_path] ||= File.join(containing, 'screenshots')
|
39
41
|
options[:metadata_path] ||= File.join(containing, 'metadata')
|
42
|
+
end
|
40
43
|
|
44
|
+
def ensure_folders_created(options)
|
41
45
|
FileUtils.mkdir_p(options[:screenshots_path])
|
42
46
|
FileUtils.mkdir_p(options[:metadata_path])
|
43
47
|
end
|
@@ -53,5 +57,13 @@ module Deliver
|
|
53
57
|
rescue
|
54
58
|
UI.user_error!("Could not infer your app's version")
|
55
59
|
end
|
60
|
+
|
61
|
+
def find_platform(options)
|
62
|
+
if options[:ipa]
|
63
|
+
options[:platform] ||= FastlaneCore::IpaFileAnalyser.fetch_app_platform(options[:ipa])
|
64
|
+
elsif options[:pkg]
|
65
|
+
options[:platform] = 'osx'
|
66
|
+
end
|
67
|
+
end
|
56
68
|
end
|
57
69
|
end
|
data/lib/deliver/loader.rb
CHANGED
@@ -2,11 +2,12 @@ require 'fastlane_core/languages'
|
|
2
2
|
|
3
3
|
module Deliver
|
4
4
|
module Loader
|
5
|
-
# The directory 'appleTV'
|
5
|
+
# The directory 'appleTV' and `iMessage` are special folders that will cause our screenshot gathering code to iterate
|
6
6
|
# through it as well searching for language folders.
|
7
7
|
APPLE_TV_DIR_NAME = "appleTV".freeze
|
8
|
+
IMESSAGE_DIR_NAME = "iMessage".freeze
|
8
9
|
DEFAULT_DIR_NAME = "default".freeze
|
9
|
-
ALL_LANGUAGES = (FastlaneCore::Languages::ALL_LANGUAGES + [APPLE_TV_DIR_NAME, APPLE_TV_DIR_NAME, DEFAULT_DIR_NAME]).map(&:downcase).freeze
|
10
|
+
ALL_LANGUAGES = (FastlaneCore::Languages::ALL_LANGUAGES + [APPLE_TV_DIR_NAME, APPLE_TV_DIR_NAME, IMESSAGE_DIR_NAME, DEFAULT_DIR_NAME]).map(&:downcase).freeze
|
10
11
|
|
11
12
|
def self.language_folders(root)
|
12
13
|
Dir.glob(File.join(root, '*')).select do |path|
|
data/lib/deliver/options.rb
CHANGED
@@ -52,6 +52,15 @@ module Deliver
|
|
52
52
|
conflict_block: proc do |value|
|
53
53
|
UI.user_error!("You can't use 'pkg' and '#{value.key}' options in one run.")
|
54
54
|
end),
|
55
|
+
FastlaneCore::ConfigItem.new(key: :platform,
|
56
|
+
short_option: "-j",
|
57
|
+
env_name: "DELIVER_PLATFORM",
|
58
|
+
description: "The platform to use (optional)",
|
59
|
+
optional: true,
|
60
|
+
default_value: "ios",
|
61
|
+
verify_block: proc do |value|
|
62
|
+
UI.user_error!("The platform can only be ios, appletvos, or osx") unless %('ios', 'appletvos', 'osx').include? value
|
63
|
+
end),
|
55
64
|
FastlaneCore::ConfigItem.new(key: :metadata_path,
|
56
65
|
short_option: '-m',
|
57
66
|
description: "Path to the folder containing the metadata files",
|
data/lib/deliver/runner.rb
CHANGED
@@ -36,7 +36,8 @@ module Deliver
|
|
36
36
|
app_version = options[:app_version]
|
37
37
|
UI.message("Making sure the latest version on iTunes Connect matches '#{app_version}' from the ipa file...")
|
38
38
|
|
39
|
-
changed = options[:app].ensure_version!(app_version)
|
39
|
+
changed = options[:app].ensure_version!(app_version, platform: options[:pkg] ? 'osx' : 'ios')
|
40
|
+
|
40
41
|
if changed
|
41
42
|
UI.success("Successfully set the version to '#{app_version}'")
|
42
43
|
else
|
@@ -6,7 +6,7 @@ module Deliver
|
|
6
6
|
|
7
7
|
app = options[:app]
|
8
8
|
|
9
|
-
v = app.edit_version
|
9
|
+
v = app.edit_version(platform: options[:platform])
|
10
10
|
UI.user_error!("Could not find a version to edit for app '#{app.name}'") unless v
|
11
11
|
|
12
12
|
UI.message("Starting with the upload of screenshots...")
|
@@ -40,13 +40,13 @@ module Deliver
|
|
40
40
|
UI.message("Uploading #{screenshots_for_language.length} screenshots for language #{language}")
|
41
41
|
screenshots_for_language.each do |screenshot|
|
42
42
|
indized[screenshot.language] ||= {}
|
43
|
-
indized[screenshot.language][screenshot.
|
44
|
-
indized[screenshot.language][screenshot.
|
43
|
+
indized[screenshot.language][screenshot.formatted_name] ||= 0
|
44
|
+
indized[screenshot.language][screenshot.formatted_name] += 1 # we actually start with 1... wtf iTC
|
45
45
|
|
46
|
-
index = indized[screenshot.language][screenshot.
|
46
|
+
index = indized[screenshot.language][screenshot.formatted_name]
|
47
47
|
|
48
48
|
if index > 5
|
49
|
-
UI.error("Too many screenshots found for device '#{screenshot.
|
49
|
+
UI.error("Too many screenshots found for device '#{screenshot.formatted_name}' in '#{screenshot.language}', skipping this one (#{screenshot.path})")
|
50
50
|
next
|
51
51
|
end
|
52
52
|
|
@@ -54,7 +54,8 @@ module Deliver
|
|
54
54
|
v.upload_screenshot!(screenshot.path,
|
55
55
|
index,
|
56
56
|
screenshot.language,
|
57
|
-
screenshot.device_type
|
57
|
+
screenshot.device_type,
|
58
|
+
screenshot.is_messages?)
|
58
59
|
end
|
59
60
|
# ideally we should only save once, but itunes server can't cope it seems
|
60
61
|
# so we save per language. See issue #349
|
@@ -77,7 +78,7 @@ module Deliver
|
|
77
78
|
language = File.basename(lng_folder)
|
78
79
|
|
79
80
|
# Check to see if we need to traverse multiple platforms or just a single platform
|
80
|
-
if language == Loader::APPLE_TV_DIR_NAME
|
81
|
+
if language == Loader::APPLE_TV_DIR_NAME || language == Loader::IMESSAGE_DIR_NAME
|
81
82
|
screenshots.concat(collect_screenshots_for_languages(File.join(path, language)))
|
82
83
|
next
|
83
84
|
end
|
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.
|
4
|
+
version: 1.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-28 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.57.1
|
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.57.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.
|
59
|
+
version: 0.38.1
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 1.0.0
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: 0.38.1
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: 1.0.0
|
@@ -310,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
310
310
|
version: '0'
|
311
311
|
requirements: []
|
312
312
|
rubyforge_project:
|
313
|
-
rubygems_version: 2.
|
313
|
+
rubygems_version: 2.2.2
|
314
314
|
signing_key:
|
315
315
|
specification_version: 4
|
316
316
|
summary: Upload screenshots, metadata and your app to the App Store using a single
|