deliver 1.6.6 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/assets/DeliverfileDefault +1 -1
- data/lib/assets/ScreenshotsHelp +2 -1
- data/lib/assets/summary.html.erb +26 -30
- data/lib/deliver/app_screenshot.rb +33 -12
- data/lib/deliver/commands_generator.rb +1 -1
- data/lib/deliver/download_screenshots.rb +8 -1
- data/lib/deliver/loader.rb +4 -1
- data/lib/deliver/upload_screenshots.rb +17 -5
- data/lib/deliver/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f073822a6cd5ae489648e54a348982bc98b71122
|
4
|
+
data.tar.gz: a7deac2ad9c35042803c15bb4aff5b3d5ad21b36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4c40f724deea58194fe74a1bbedb431f126a267ddbfa43ddf4427f5cadf6543d1ae4ad0183b5041946c94d32c3842476076ecab8fd9cf12693bdd29ebebf97f
|
7
|
+
data.tar.gz: e25d930ab3d631813f91bac218101961ad1ecce5ad04ad1acbb941c0768dec7bffd1aba26db5838a9e4bad325487400c59842e523070e673ca93db5f907b3646
|
data/README.md
CHANGED
@@ -29,8 +29,8 @@
|
|
29
29
|
deliver
|
30
30
|
============
|
31
31
|
|
32
|
-
[![Twitter: @KauseFx](https://img.shields.io/badge/contact-@
|
33
|
-
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/
|
32
|
+
[![Twitter: @KauseFx](https://img.shields.io/badge/contact-@FastlaneTools-blue.svg?style=flat)](https://twitter.com/FastlaneTools)
|
33
|
+
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/deliver/blob/master/LICENSE)
|
34
34
|
[![Gem](https://img.shields.io/gem/v/deliver.svg?style=flat)](http://rubygems.org/gems/deliver)
|
35
35
|
[![Build Status](https://img.shields.io/travis/fastlane/deliver/master.svg?style=flat)](https://travis-ci.org/fastlane/deliver)
|
36
36
|
|
@@ -38,7 +38,7 @@ deliver
|
|
38
38
|
|
39
39
|
`deliver` can upload ipa files, app screenshots and more to iTunes Connect from the command line.
|
40
40
|
|
41
|
-
Get in contact with the developer on Twitter: [@
|
41
|
+
Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.com/FastlaneTools)
|
42
42
|
|
43
43
|
-------
|
44
44
|
<p align="center">
|
@@ -1,6 +1,6 @@
|
|
1
1
|
###################### More Options ######################
|
2
2
|
# If you want to have even more control, check out the documentation
|
3
|
-
# https://github.com/
|
3
|
+
# https://github.com/fastlane/deliver/blob/master/Deliverfile.md
|
4
4
|
|
5
5
|
|
6
6
|
###################### Automatically generated ######################
|
data/lib/assets/ScreenshotsHelp
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
Put all screenshots you want to use inside the folder of its language (e.g. en-US).
|
2
|
-
The device type will automatically be recognized using the image resolution.
|
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
4
|
|
4
5
|
The screenshots can be named whatever you want, but keep in mind they are sorted alphabetically.
|
data/lib/assets/summary.html.erb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
<!DOCTYPE html>
|
1
2
|
<html>
|
2
3
|
<head>
|
3
4
|
<title>deliver - <%= @app_name %></title>
|
4
|
-
<meta http-equiv="content-type" content="text/html; charset=UTF-
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
5
6
|
<style>
|
6
|
-
|
7
|
+
.app-name {
|
7
8
|
font-size: 42px;
|
8
9
|
font-family: 'Helvetica Neue', HelveticaNeue, Helvetica Neue;
|
9
10
|
font-weight: 300;
|
@@ -12,7 +13,7 @@
|
|
12
13
|
margin-right: 25px;
|
13
14
|
}
|
14
15
|
|
15
|
-
|
16
|
+
.app-urls {
|
16
17
|
margin-left: 25px;
|
17
18
|
font-size: 14px;
|
18
19
|
margin-top: 4px;
|
@@ -40,7 +41,7 @@
|
|
40
41
|
margin-right: 10px;
|
41
42
|
}
|
42
43
|
|
43
|
-
|
44
|
+
.app-keyword {
|
44
45
|
margin-left: 25px;
|
45
46
|
margin-right: 25px;
|
46
47
|
margin-top: 22px;
|
@@ -53,24 +54,24 @@
|
|
53
54
|
|
54
55
|
|
55
56
|
|
56
|
-
|
57
|
+
.app-description {
|
57
58
|
margin-left: 25px;
|
58
59
|
margin-right: 25px;
|
59
60
|
margin-top: 22px;
|
60
61
|
}
|
61
62
|
|
62
|
-
|
63
|
+
.app-description-text {
|
63
64
|
font-weight: 300;
|
64
65
|
}
|
65
66
|
|
66
|
-
|
67
|
+
.app-changelog {
|
67
68
|
margin-left: 25px;
|
68
69
|
margin-right: 25px;
|
69
70
|
margin-top: 22px;
|
70
71
|
font-weight: 300;
|
71
72
|
}
|
72
73
|
|
73
|
-
|
74
|
+
.app-screenshots {
|
74
75
|
margin-left: 15px;
|
75
76
|
margin-right: 15px;
|
76
77
|
margin-top: 22px;
|
@@ -112,16 +113,16 @@
|
|
112
113
|
<body>
|
113
114
|
<% @languages.each do |language| %>
|
114
115
|
<% if @options[:name] %>
|
115
|
-
<div
|
116
|
+
<div class="app-name">
|
116
117
|
<%= language %>: <%= @options[:name][language] %>
|
117
118
|
</div>
|
118
119
|
<% else %>
|
119
|
-
<div
|
120
|
+
<div class="app-name">
|
120
121
|
<%= language %>
|
121
122
|
</div>
|
122
123
|
<% end %>
|
123
124
|
|
124
|
-
<div
|
125
|
+
<div class="app-urls">
|
125
126
|
<% all_keys = [:support_url, :marketing_url] %>
|
126
127
|
<% all_keys.each do |key| %>
|
127
128
|
<% value = @options[key][language] if @options[key] %>
|
@@ -134,7 +135,7 @@
|
|
134
135
|
</div>
|
135
136
|
|
136
137
|
<% if @options[:keywords] and @options[:keywords][language] %>
|
137
|
-
<div
|
138
|
+
<div class="app-keyword">
|
138
139
|
<div class="cat-headline">Keywords</div>
|
139
140
|
<ul class="app-keyword-list">
|
140
141
|
<% @options[:keywords][language].split(" ").each do |keyword| %>
|
@@ -145,22 +146,22 @@
|
|
145
146
|
<% end %>
|
146
147
|
|
147
148
|
<% if @options[:description] %>
|
148
|
-
<div
|
149
|
+
<div class="app-description">
|
149
150
|
<div class="cat-headline">Description</div>
|
150
|
-
<div
|
151
|
+
<div class="app-description-text">
|
151
152
|
<%= (@options[:description][language] || '').gsub("\n", "<br />") %>
|
152
153
|
</div>
|
153
154
|
</div>
|
154
155
|
<% end %>
|
155
156
|
|
156
157
|
<% if @options[:release_notes] %>
|
157
|
-
<div
|
158
|
+
<div class="app-changelog">
|
158
159
|
<div class="cat-headline">Changelog</div>
|
159
160
|
<%= (@options[:release_notes][language] || '').gsub("\n", "<br />") %>
|
160
161
|
</div>
|
161
162
|
<% end %>
|
162
163
|
|
163
|
-
<div
|
164
|
+
<div class="app-screenshots">
|
164
165
|
<div class="cat-headline">Screenshots</div>
|
165
166
|
|
166
167
|
<% if options[:skip_screenshots] %>
|
@@ -170,24 +171,19 @@
|
|
170
171
|
</p>
|
171
172
|
</div>
|
172
173
|
<% elsif @screenshots.count > 0 %>
|
173
|
-
<% last_size = nil %>
|
174
174
|
<% sc = @screenshots.find_all { |s| s.language == language } %>
|
175
|
-
<% sc.
|
175
|
+
<% sc_by_size = sc.group_by { |i| i.screen_size } %>
|
176
176
|
|
177
|
-
|
177
|
+
<% sc_by_size.keys.sort.each do |screen_size| %>
|
178
|
+
<% screenshots = sc_by_size[screen_size].sort { |a, b| [a.path] <=> [b.path] } %>
|
179
|
+
<%# we are guaranteed to have at least one element because of the group_by %>
|
180
|
+
<h4><%= screenshots[0].formatted_name %></h4>
|
181
|
+
<div class="app-screenshot-row">
|
178
182
|
|
179
|
-
<%
|
180
|
-
|
183
|
+
<% screenshots.each_with_index do |screenshot, index| %>
|
184
|
+
<a href="<%= screenshot.path %>" target="_blank"><img class="app-screenshot" src="<%= screenshot.path %>" title="Screenshot #<%=index%> for <%=language%>"></a>
|
181
185
|
<% end %>
|
182
|
-
|
183
|
-
<% if new_row %>
|
184
|
-
<h4><%= screenshot.formatted_name %></h4>
|
185
|
-
<div class="app-screenshot-row">
|
186
|
-
<% end %>
|
187
|
-
|
188
|
-
<a href="<%= screenshot.path %>" target="_blank"><img class="app-screenshot" src="<%= screenshot.path %>"></a>
|
189
|
-
|
190
|
-
<% last_size = screenshot.screen_size %>
|
186
|
+
</div>
|
191
187
|
<% end %>
|
192
188
|
<% else %>
|
193
189
|
<!-- no screenshots -->
|
@@ -21,6 +21,8 @@ module Deliver
|
|
21
21
|
IOS_APPLE_WATCH = "iOS-Apple-Watch"
|
22
22
|
# Mac
|
23
23
|
MAC = "Mac"
|
24
|
+
# Apple TV
|
25
|
+
APPLE_TV = "Apple-TV"
|
24
26
|
end
|
25
27
|
|
26
28
|
# @return [Deliver::ScreenSize] the screen size (device type)
|
@@ -55,7 +57,8 @@ module Deliver
|
|
55
57
|
ScreenSize::IOS_IPAD => "ipad",
|
56
58
|
ScreenSize::IOS_IPAD_PRO => "ipadPro",
|
57
59
|
ScreenSize::MAC => "desktop",
|
58
|
-
ScreenSize::IOS_APPLE_WATCH => "watch"
|
60
|
+
ScreenSize::IOS_APPLE_WATCH => "watch",
|
61
|
+
ScreenSize::APPLE_TV => "appleTV"
|
59
62
|
}
|
60
63
|
return matching[self.screen_size]
|
61
64
|
end
|
@@ -70,7 +73,8 @@ module Deliver
|
|
70
73
|
ScreenSize::IOS_IPAD => "iPad",
|
71
74
|
ScreenSize::IOS_IPAD_PRO => "iPad Pro",
|
72
75
|
ScreenSize::MAC => "Mac",
|
73
|
-
ScreenSize::IOS_APPLE_WATCH => "Watch"
|
76
|
+
ScreenSize::IOS_APPLE_WATCH => "Watch",
|
77
|
+
ScreenSize::APPLE_TV => "Apple TV"
|
74
78
|
}
|
75
79
|
return matching[self.screen_size]
|
76
80
|
end
|
@@ -84,12 +88,8 @@ module Deliver
|
|
84
88
|
end
|
85
89
|
# rubocop:enable Style/PredicateName
|
86
90
|
|
87
|
-
def self.
|
88
|
-
|
89
|
-
|
90
|
-
raise "Could not find or parse file at path '#{path}'" if size.nil? or size.count == 0
|
91
|
-
|
92
|
-
devices = {
|
91
|
+
def self.devices
|
92
|
+
return {
|
93
93
|
ScreenSize::IOS_55 => [
|
94
94
|
[1080, 1920],
|
95
95
|
[1242, 2208]
|
@@ -129,14 +129,35 @@ module Deliver
|
|
129
129
|
],
|
130
130
|
ScreenSize::IOS_APPLE_WATCH => [
|
131
131
|
[312, 390]
|
132
|
+
],
|
133
|
+
ScreenSize::APPLE_TV => [
|
134
|
+
[1920, 1080]
|
132
135
|
]
|
133
136
|
}
|
137
|
+
end
|
138
|
+
|
139
|
+
def self.calculate_screen_size(path)
|
140
|
+
size = FastImage.size(path)
|
141
|
+
|
142
|
+
raise "Could not find or parse file at path '#{path}'" if size.nil? or size.count == 0
|
143
|
+
|
144
|
+
# Walk up two directories and test if we need to handle a platform that doesn't support landscape
|
145
|
+
path_component = Pathname.new(path).each_filename.to_a[-3]
|
146
|
+
if path_component.eql? "appleTV"
|
147
|
+
skip_landscape = true
|
148
|
+
end
|
134
149
|
|
135
|
-
devices.each do |device_type, array|
|
150
|
+
self.devices.each do |device_type, array|
|
136
151
|
array.each do |resolution|
|
137
|
-
if
|
138
|
-
|
139
|
-
|
152
|
+
if skip_landscape
|
153
|
+
if size[0] == resolution[0] and size[1] == resolution[1] # portrait
|
154
|
+
return device_type
|
155
|
+
end
|
156
|
+
else
|
157
|
+
if (size[0] == resolution[0] and size[1] == resolution[1]) or # portrait
|
158
|
+
(size[1] == resolution[0] and size[0] == resolution[1]) # landscape
|
159
|
+
return device_type
|
160
|
+
end
|
140
161
|
end
|
141
162
|
end
|
142
163
|
end
|
@@ -21,7 +21,7 @@ module Deliver
|
|
21
21
|
program :description, Deliver::DESCRIPTION
|
22
22
|
program :help, 'Author', 'Felix Krause <deliver@krausefx.com>'
|
23
23
|
program :help, 'Website', 'https://fastlane.tools'
|
24
|
-
program :help, 'GitHub', 'https://github.com/
|
24
|
+
program :help, 'GitHub', 'https://github.com/fastlane/deliver'
|
25
25
|
program :help_formatter, :compact
|
26
26
|
|
27
27
|
FastlaneCore::CommanderGenerator.new.generate(Deliver::Options.available_options)
|
@@ -20,7 +20,14 @@ module Deliver
|
|
20
20
|
|
21
21
|
Helper.log.info "Downloading existing screenshot '#{file_name}'"
|
22
22
|
|
23
|
-
|
23
|
+
# If the screen shot is for an appleTV we need to store it in a way that we'll know it's an appleTV
|
24
|
+
# screen shot later as the screen size is the same as an iPhone 6 Plus in landscape.
|
25
|
+
if screenshot.device_type == "appleTV"
|
26
|
+
containing_folder = File.join(folder_path, "screenshots", "appleTV", screenshot.language)
|
27
|
+
else
|
28
|
+
containing_folder = File.join(folder_path, "screenshots", screenshot.language)
|
29
|
+
end
|
30
|
+
|
24
31
|
begin
|
25
32
|
FileUtils.mkdir_p(containing_folder)
|
26
33
|
rescue
|
data/lib/deliver/loader.rb
CHANGED
@@ -2,7 +2,10 @@ require 'fastlane_core/languages'
|
|
2
2
|
|
3
3
|
module Deliver
|
4
4
|
module Loader
|
5
|
-
|
5
|
+
# The directory 'appleTV' is a special folder that will cause our screenshot gathering code to iterate
|
6
|
+
# through it as well searching for language folders.
|
7
|
+
APPLE_TV_DIR_NAME = "appleTV"
|
8
|
+
ALL_LANGUAGES = (FastlaneCore::Languages::ALL_LANGUAGES + [APPLE_TV_DIR_NAME]).map(&:downcase).freeze
|
6
9
|
|
7
10
|
def self.language_folders(root)
|
8
11
|
Dir.glob(File.join(root, '*')).select do |path|
|
@@ -54,21 +54,33 @@ module Deliver
|
|
54
54
|
|
55
55
|
def collect_screenshots(options)
|
56
56
|
return [] if options[:skip_screenshots]
|
57
|
+
return collect_screenshots_for_languages(options[:screenshots_path])
|
58
|
+
end
|
57
59
|
|
60
|
+
def collect_screenshots_for_languages(path)
|
58
61
|
screenshots = []
|
59
62
|
extensions = '{png,jpg,jpeg}'
|
60
|
-
|
63
|
+
|
64
|
+
Loader.language_folders(path).each do |lng_folder|
|
65
|
+
language = File.basename(lng_folder)
|
66
|
+
|
67
|
+
# Check to see if we need to traverse multiple platforms or just a single platform
|
68
|
+
if language == Loader::APPLE_TV_DIR_NAME
|
69
|
+
screenshots.concat(collect_screenshots_for_languages(File.join(path, language)))
|
70
|
+
next
|
71
|
+
end
|
72
|
+
|
61
73
|
files = Dir.glob(File.join(lng_folder, "*.#{extensions}"))
|
62
74
|
next if files.count == 0
|
63
75
|
|
64
76
|
prefer_framed = Dir.glob(File.join(lng_folder, "*_framed.#{extensions}")).count > 0
|
65
77
|
|
66
78
|
language = File.basename(lng_folder)
|
67
|
-
files.each do |
|
68
|
-
if
|
79
|
+
files.each do |file_path|
|
80
|
+
if file_path.downcase.include?("_framed.")
|
69
81
|
# That's cool
|
70
82
|
else
|
71
|
-
if
|
83
|
+
if file_path.downcase.include?("watch")
|
72
84
|
# Watch doesn't support frames (yet)
|
73
85
|
else
|
74
86
|
# That might not be cool... if that screenshot is not framed but we only want framed
|
@@ -76,7 +88,7 @@ module Deliver
|
|
76
88
|
end
|
77
89
|
end
|
78
90
|
|
79
|
-
screenshots << AppScreenshot.new(
|
91
|
+
screenshots << AppScreenshot.new(file_path, language)
|
80
92
|
end
|
81
93
|
end
|
82
94
|
|
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.7.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-01-
|
11
|
+
date: 2016-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -289,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
289
289
|
version: '0'
|
290
290
|
requirements: []
|
291
291
|
rubyforge_project:
|
292
|
-
rubygems_version: 2.4.
|
292
|
+
rubygems_version: 2.4.0
|
293
293
|
signing_key:
|
294
294
|
specification_version: 4
|
295
295
|
summary: Upload screenshots, metadata and your app to the App Store using a single
|