deliver 0.12.1 → 0.13.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 +17 -13
- data/bin/deliver +1 -136
- data/lib/deliver.rb +1 -0
- data/lib/deliver/app_metadata.rb +27 -1
- data/lib/deliver/commands_generator.rb +143 -0
- data/lib/deliver/deliver_process.rb +4 -2
- data/lib/deliver/deliverer.rb +2 -0
- data/lib/deliver/deliverfile/dsl.rb +1 -0
- data/lib/deliver/itunes_connect/itunes_connect_additional.rb +33 -20
- data/lib/deliver/version.rb +1 -1
- metadata +34 -34
- data/lib/deliver/commands.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f1d1eb0699a1a0a0f04492e5168f7feb2977500
|
4
|
+
data.tar.gz: e427eef65961eeb62a40cbf5dca506a1ad0a7a46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36c704f7651c67039178be31e0316840916ab37204cd0efa12f44b13082ee8310d55443ebdd7aa72739be61a775928fec26c362828bd3ccf8ca88380a76206c0
|
7
|
+
data.tar.gz: 70fb8b9c4d9e8b1e08a6350262ad10ea168386b5a9fc6eae53f17e1fe4596747e685f9a406abd14e401a747ec2ae6d5172d0d859709be546b82457be346e04c5
|
data/README.md
CHANGED
@@ -13,7 +13,10 @@
|
|
13
13
|
<a href="https://github.com/KrauseFx/sigh">sigh</a> •
|
14
14
|
<a href="https://github.com/KrauseFx/produce">produce</a> •
|
15
15
|
<a href="https://github.com/KrauseFx/cert">cert</a> •
|
16
|
-
<a href="https://github.com/KrauseFx/codes">codes</a>
|
16
|
+
<a href="https://github.com/KrauseFx/codes">codes</a> •
|
17
|
+
<a href="https://github.com/fastlane/spaceship">spaceship</a> •
|
18
|
+
<a href="https://github.com/fastlane/pilot">pilot</a> •
|
19
|
+
<a href="https://github.com/fastlane/boarding">boarding</a>
|
17
20
|
</p>
|
18
21
|
-------
|
19
22
|
|
@@ -74,11 +77,13 @@ Make sure, you have the latest version of the Xcode command line tools installed
|
|
74
77
|
|
75
78
|
xcode-select --install
|
76
79
|
|
77
|
-
To create new screenshots automatically, check out my other open source project [
|
80
|
+
To create new screenshots automatically, check out my other open source project [snapshot](https://github.com/KrauseFx/snapshot).
|
78
81
|
|
79
82
|
# TestFlight
|
80
83
|
|
81
|
-
To upload
|
84
|
+
**New**: To upload builds to TestFlight, use the new [pilot](https://github.com/fastlane/pilot) tool.
|
85
|
+
|
86
|
+
Upload a new build to Apple `TestFlight` use the following command:
|
82
87
|
|
83
88
|
```
|
84
89
|
deliver testflight
|
@@ -92,16 +97,10 @@ Make sure to increase your build number before building and uploading your app.
|
|
92
97
|
|
93
98
|
#### More options:
|
94
99
|
|
95
|
-
Specify the `ipa` file to be used:
|
96
|
-
|
97
|
-
```
|
98
|
-
deliver testflight ./my_app.ipa
|
99
|
-
```
|
100
|
-
|
101
|
-
Pass the Apple ID and App ID to be used (optional):
|
100
|
+
Specify the `ipa` file, the Apple ID and app identifier to be used:
|
102
101
|
|
103
102
|
```
|
104
|
-
deliver testflight -u felix@krausefx.com -a 862582703
|
103
|
+
deliver testflight ./my_app.ipa -u felix@krausefx.com -a 862582703
|
105
104
|
```
|
106
105
|
|
107
106
|
To build and upload the ipa in one step, you can use [shenzhen](https://github.com/nomad/shenzhen):
|
@@ -164,7 +163,7 @@ screenshots_path "./screenshots"
|
|
164
163
|
```
|
165
164
|
The screenshots folder must include one subfolder per language (see [Available language codes](#available-language-codes)).
|
166
165
|
|
167
|
-
The screenshots are ordered alphabetically. The best way to sort them is to prepend a number before the actual screenshot name.
|
166
|
+
The screenshots are ordered alphabetically. The best way to sort them is to prepend a number before the actual screenshot name. You can also put Watch screenshots into this folder.
|
168
167
|
|
169
168
|
To let the computer create the screenshots for you, checkout [this section of the README](#automatically-create-screenshots).
|
170
169
|
|
@@ -320,6 +319,9 @@ Before actually uploading anything to iTunes, ```deliver``` will generate a [PDF
|
|
320
319
|
- [`produce`](https://github.com/KrauseFx/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
|
321
320
|
- [`cert`](https://github.com/KrauseFx/cert): Automatically create and maintain iOS code signing certificates
|
322
321
|
- [`codes`](https://github.com/KrauseFx/codes): Create promo codes for iOS Apps using the command line
|
322
|
+
- [`spaceship`](https://github.com/fastlane/spaceship): Ruby library to access the Apple Dev Center and iTunes Connect
|
323
|
+
- [`pilot`](https://github.com/fastlane/pilot): The best way to manage your TestFlight testers and builds from your terminal
|
324
|
+
- [`boarding`](https://github.com/fastlane/boarding): The easiest way to invite your TestFlight beta testers
|
323
325
|
|
324
326
|
##### [Like this tool? Be the first to know about updates and new fastlane tools](https://tinyletter.com/krausefx)
|
325
327
|
|
@@ -342,7 +344,7 @@ Detailed instructions about how to set up `deliver` and `fastlane` in `Jenkins`
|
|
342
344
|
|
343
345
|
## Firewall Issues
|
344
346
|
|
345
|
-
`deliver` uses the iTunes Transporter to upload metadata and binaries. In case you are behind a firewall, you can specify a different transporter
|
347
|
+
`deliver` uses the iTunes Transporter to upload metadata and binaries. In case you are behind a firewall, you can specify a different transporter protocol using
|
346
348
|
|
347
349
|
```
|
348
350
|
DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS="-t DAV" deliver
|
@@ -361,6 +363,8 @@ Change syntax highlighting to *Ruby*.
|
|
361
363
|
# License
|
362
364
|
This project is licensed under the terms of the MIT license. See the LICENSE file.
|
363
365
|
|
366
|
+
> This project and all fastlane tools are in no way affiliated with Apple Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.
|
367
|
+
|
364
368
|
# Contributing
|
365
369
|
|
366
370
|
1. Create an issue to discuss about your idea
|
data/bin/deliver
CHANGED
@@ -1,140 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
2
|
$:.push File.expand_path("../../lib", __FILE__)
|
4
3
|
|
5
4
|
require 'deliver'
|
6
|
-
|
7
|
-
require 'deliver/download_screenshots'
|
8
|
-
|
9
|
-
HighLine.track_eof = false
|
10
|
-
|
11
|
-
class FastlaneApplication
|
12
|
-
include Commander::Methods
|
13
|
-
|
14
|
-
def run
|
15
|
-
program :version, Deliver::VERSION
|
16
|
-
program :description, 'CLI for \'deliver\' - Upload screenshots, metadata and your app to the App Store using a single command'
|
17
|
-
program :help, 'Author', 'Felix Krause <deliver@krausefx.com>'
|
18
|
-
program :help, 'Website', 'https://fastlane.tools'
|
19
|
-
program :help, 'GitHub', 'https://github.com/krausefx/deliver'
|
20
|
-
program :help_formatter, :compact
|
21
|
-
|
22
|
-
global_option '-f', '--force', 'Runs a deployment without verifying any information (PDF file). This can be used for build servers.'
|
23
|
-
global_option '--beta', 'Upload a beta build to iTunes Connect. This uses the `beta_ipa` block.'
|
24
|
-
global_option '--skip-deploy', 'Skips submission of the build on iTunes Connect. This will only upload the ipa and/or metadata.'
|
25
|
-
|
26
|
-
always_trace!
|
27
|
-
|
28
|
-
command :run do |c|
|
29
|
-
c.syntax = 'deliver'
|
30
|
-
c.description = 'Run a deploy process using the Deliverfile in the current folder'
|
31
|
-
c.action do |args, options|
|
32
|
-
run_deliver(options)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
command :upload_metadata do |c|
|
37
|
-
c.syntax = 'deliver upload_metadata'
|
38
|
-
c.description = "Uploads new app metadata only. No binary will be uploaded"
|
39
|
-
c.action do |args, options|
|
40
|
-
ENV["DELIVER_SKIP_BINARY"] = "1"
|
41
|
-
run_deliver(options)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def run_deliver(options)
|
46
|
-
path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
|
47
|
-
Dir.chdir(path) do # switch the context
|
48
|
-
if File.exists?(deliver_path)
|
49
|
-
# Everything looks alright, use the given Deliverfile
|
50
|
-
options.default :beta => false, :skip_deploy => false
|
51
|
-
Deliver::Deliverer.new(deliver_path, force: options.force, is_beta_ipa: options.beta, skip_deploy: options.skip_deploy)
|
52
|
-
else
|
53
|
-
Deliver::Helper.log.warn("No Deliverfile found at path '#{deliver_path}'.")
|
54
|
-
if agree("Do you want to create a new Deliverfile at the current directory? (y/n)", true)
|
55
|
-
Deliver::DeliverfileCreator.create(enclosed_directory)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
command :init do |c|
|
62
|
-
c.syntax = 'deliver init'
|
63
|
-
c.option '-u', '--username String', String, 'Your Apple ID'
|
64
|
-
c.description = "Creates a new Deliverfile in the current directory"
|
65
|
-
|
66
|
-
c.action do |args, options|
|
67
|
-
set_username(options.username)
|
68
|
-
|
69
|
-
path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
|
70
|
-
Deliver::DeliverfileCreator.create(path)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
command :download_screenshots do |c|
|
75
|
-
c.syntax = 'deliver download_screenshots'
|
76
|
-
c.description = "Downloads all existing screenshots from iTunes Connect and stores them in the screenshots folder"
|
77
|
-
c.option '-a', '--app_identifier String', String, 'The App Identifier (e.g. com.krausefx.app)'
|
78
|
-
c.option '-u', '--username String', String, 'Your Apple ID'
|
79
|
-
c.action do |args, options|
|
80
|
-
set_username(options.username)
|
81
|
-
|
82
|
-
app_identifier = options.app_identifier || CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) || ask("Please enter the app's bundle identifier: ")
|
83
|
-
app = Deliver::App.new(app_identifier: app_identifier)
|
84
|
-
|
85
|
-
path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
|
86
|
-
path = File.join(path, "deliver")
|
87
|
-
|
88
|
-
Deliver::DownloadScreenshots.run(app, path)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
command :testflight do |c|
|
93
|
-
c.syntax = 'deliver testflight'
|
94
|
-
c.description = "Uploads a given ipa file to the new Apple TestFlight"
|
95
|
-
c.option '-a', '--app_id String', String, 'The App ID (numeric, like 956814360)'
|
96
|
-
c.option '-u', '--username String', String, 'Your Apple ID'
|
97
|
-
|
98
|
-
c.action do |args, options|
|
99
|
-
ipa_path = (args.first || determine_ipa) + '' # unfreeze the string
|
100
|
-
|
101
|
-
set_username(options.username)
|
102
|
-
|
103
|
-
Deliver::Testflight.upload!(ipa_path, options.app_id, options.skip_deploy)
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
def set_username(username)
|
108
|
-
user = username
|
109
|
-
user ||= ENV["DELIVER_USERNAME"]
|
110
|
-
user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
|
111
|
-
CredentialsManager::PasswordManager.shared_manager(user) if user
|
112
|
-
end
|
113
|
-
|
114
|
-
def determine_ipa
|
115
|
-
return Dir['*.ipa'].first if Dir["*.ipa"].count == 1
|
116
|
-
return ask("Path to IPA file to upload: ".green)
|
117
|
-
end
|
118
|
-
|
119
|
-
default_command :run
|
120
|
-
|
121
|
-
run!
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
def deliver_path
|
126
|
-
File.join(enclosed_directory, Deliver::Deliverfile::Deliverfile::FILE_NAME)
|
127
|
-
end
|
128
|
-
|
129
|
-
# The directoy in which the Deliverfile and metadata should be created
|
130
|
-
def enclosed_directory
|
131
|
-
"."
|
132
|
-
end
|
133
|
-
|
134
|
-
begin
|
135
|
-
FastlaneCore::UpdateChecker.start_looking_for_update('deliver')
|
136
|
-
Deliver::DependencyChecker.check_dependencies
|
137
|
-
FastlaneApplication.new.run
|
138
|
-
ensure
|
139
|
-
FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
|
140
|
-
end
|
5
|
+
Deliver::CommandsGenerator.start
|
data/lib/deliver.rb
CHANGED
data/lib/deliver/app_metadata.rb
CHANGED
@@ -217,7 +217,33 @@ module Deliver
|
|
217
217
|
raise "Invalid price tier '#{tier}' given, must be 0 to 94".red unless (tier.to_i >= 0 and tier.to_i <= 87)
|
218
218
|
|
219
219
|
price = fetch_value("//x:wholesale_price_tier").last
|
220
|
-
|
220
|
+
unless price
|
221
|
+
Helper.log.info "No initial pricing found, setting the first one."
|
222
|
+
|
223
|
+
formatted_date = "2015-01-01"
|
224
|
+
pricing = Nokogiri.XML("
|
225
|
+
<products>
|
226
|
+
<product>
|
227
|
+
<territory>WW</territory>
|
228
|
+
<cleared_for_sale>true</cleared_for_sale>
|
229
|
+
<sales_start_date>#{formatted_date}</sales_start_date>
|
230
|
+
<intervals>
|
231
|
+
<interval>
|
232
|
+
<start_date>#{formatted_date}</start_date>
|
233
|
+
<wholesale_price_tier>0</wholesale_price_tier>
|
234
|
+
</interval>
|
235
|
+
</intervals>
|
236
|
+
<allow_volume_discount>true</allow_volume_discount>
|
237
|
+
</product>
|
238
|
+
</products>")
|
239
|
+
software_metadata = fetch_value("//x:software_metadata").last
|
240
|
+
software_metadata << pricing.root
|
241
|
+
|
242
|
+
# We're done here, now fetch the element again and set the real price tier
|
243
|
+
price = fetch_value("//x:wholesale_price_tier").last
|
244
|
+
raise "Something went wrong creating the new price tier" unless price
|
245
|
+
end
|
246
|
+
|
221
247
|
price.content = tier
|
222
248
|
end
|
223
249
|
|
@@ -0,0 +1,143 @@
|
|
1
|
+
require 'commander'
|
2
|
+
require 'deliver/download_screenshots'
|
3
|
+
|
4
|
+
HighLine.track_eof = false
|
5
|
+
|
6
|
+
module Deliver
|
7
|
+
class CommandsGenerator
|
8
|
+
include Commander::Methods
|
9
|
+
|
10
|
+
def self.start(def_command = nil)
|
11
|
+
begin
|
12
|
+
FastlaneCore::UpdateChecker.start_looking_for_update('deliver')
|
13
|
+
Deliver::DependencyChecker.check_dependencies
|
14
|
+
self.new.run(def_command)
|
15
|
+
ensure
|
16
|
+
FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def run(def_command = nil)
|
21
|
+
def_command ||= :run
|
22
|
+
program :version, Deliver::VERSION
|
23
|
+
program :description, 'CLI for \'deliver\' - Upload screenshots, metadata and your app to the App Store using a single command'
|
24
|
+
program :help, 'Author', 'Felix Krause <deliver@krausefx.com>'
|
25
|
+
program :help, 'Website', 'https://fastlane.tools'
|
26
|
+
program :help, 'GitHub', 'https://github.com/krausefx/deliver'
|
27
|
+
program :help_formatter, :compact
|
28
|
+
|
29
|
+
global_option '-f', '--force', 'Runs a deployment without verifying any information (PDF file). This can be used for build servers.'
|
30
|
+
global_option '--beta', 'Upload a beta build to iTunes Connect. This uses the `beta_ipa` block.'
|
31
|
+
global_option '--skip-deploy', 'Skips submission of the build on iTunes Connect. This will only upload the ipa and/or metadata.'
|
32
|
+
|
33
|
+
always_trace!
|
34
|
+
|
35
|
+
command :run do |c|
|
36
|
+
c.syntax = 'deliver'
|
37
|
+
c.description = 'Run a deploy process using the Deliverfile in the current folder'
|
38
|
+
c.action do |args, options|
|
39
|
+
run_deliver(options)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
command :upload_metadata do |c|
|
44
|
+
c.syntax = 'deliver upload_metadata'
|
45
|
+
c.description = "Uploads new app metadata only. No binary will be uploaded"
|
46
|
+
c.action do |args, options|
|
47
|
+
ENV["DELIVER_SKIP_BINARY"] = "1"
|
48
|
+
run_deliver(options)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def run_deliver(options)
|
53
|
+
path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
|
54
|
+
Dir.chdir(path) do # switch the context
|
55
|
+
if File.exists?(deliver_path)
|
56
|
+
# Everything looks alright, use the given Deliverfile
|
57
|
+
options.default :beta => false, :skip_deploy => false
|
58
|
+
Deliver::Deliverer.new(deliver_path, force: options.force, is_beta_ipa: options.beta, skip_deploy: options.skip_deploy)
|
59
|
+
else
|
60
|
+
Deliver::Helper.log.warn("No Deliverfile found at path '#{deliver_path}'.")
|
61
|
+
if agree("Do you want to create a new Deliverfile at the current directory? (y/n)", true)
|
62
|
+
Deliver::DeliverfileCreator.create(enclosed_directory)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
command :init do |c|
|
69
|
+
c.syntax = 'deliver init'
|
70
|
+
c.option '-u', '--username String', String, 'Your Apple ID'
|
71
|
+
c.description = "Creates a new Deliverfile in the current directory"
|
72
|
+
|
73
|
+
c.action do |args, options|
|
74
|
+
set_username(options.username)
|
75
|
+
|
76
|
+
path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
|
77
|
+
Deliver::DeliverfileCreator.create(path)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
command :download_screenshots do |c|
|
82
|
+
c.syntax = 'deliver download_screenshots'
|
83
|
+
c.description = "Downloads all existing screenshots from iTunes Connect and stores them in the screenshots folder"
|
84
|
+
c.option '-a', '--app_identifier String', String, 'The App Identifier (e.g. com.krausefx.app)'
|
85
|
+
c.option '-u', '--username String', String, 'Your Apple ID'
|
86
|
+
c.action do |args, options|
|
87
|
+
set_username(options.username)
|
88
|
+
|
89
|
+
app_identifier = options.app_identifier || CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) || ask("Please enter the app's bundle identifier: ")
|
90
|
+
app = Deliver::App.new(app_identifier: app_identifier)
|
91
|
+
|
92
|
+
path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
|
93
|
+
path = File.join(path, "deliver")
|
94
|
+
|
95
|
+
Deliver::DownloadScreenshots.run(app, path)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
command :testflight do |c|
|
100
|
+
c.syntax = 'deliver testflight'
|
101
|
+
c.description = "Uploads a given ipa file to the new Apple TestFlight"
|
102
|
+
c.option '-a', '--app_id String', String, 'The App ID (numeric, like 956814360)'
|
103
|
+
c.option '-u', '--username String', String, 'Your Apple ID'
|
104
|
+
|
105
|
+
c.action do |args, options|
|
106
|
+
ipa_path = (args.first || determine_ipa) + '' # unfreeze the string
|
107
|
+
|
108
|
+
set_username(options.username)
|
109
|
+
|
110
|
+
Deliver::Testflight.upload!(ipa_path, options.app_id, options.skip_deploy)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
def set_username(username)
|
115
|
+
user = username
|
116
|
+
user ||= ENV["DELIVER_USERNAME"]
|
117
|
+
user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
|
118
|
+
CredentialsManager::PasswordManager.shared_manager(user) if user
|
119
|
+
end
|
120
|
+
|
121
|
+
def determine_ipa
|
122
|
+
return Dir['*.ipa'].first if Dir["*.ipa"].count == 1
|
123
|
+
loop do
|
124
|
+
path = ask("Path to IPA file to upload: ".green)
|
125
|
+
return path if File.exists?(path)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
def deliver_path
|
130
|
+
File.join(enclosed_directory, Deliver::Deliverfile::Deliverfile::FILE_NAME)
|
131
|
+
end
|
132
|
+
|
133
|
+
# The directoy in which the Deliverfile and metadata should be created
|
134
|
+
def enclosed_directory
|
135
|
+
"."
|
136
|
+
end
|
137
|
+
|
138
|
+
default_command def_command
|
139
|
+
|
140
|
+
run!
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -39,7 +39,7 @@ module Deliver
|
|
39
39
|
|
40
40
|
|
41
41
|
if is_beta_build?
|
42
|
-
Helper.log.info "Beta builds don't upload new metadata to
|
42
|
+
Helper.log.info "Beta builds don't upload new metadata to iTunesConnect".yellow
|
43
43
|
else
|
44
44
|
upload_metadata
|
45
45
|
end
|
@@ -366,7 +366,9 @@ module Deliver
|
|
366
366
|
# Categories
|
367
367
|
primary = @deploy_information[Deliverer::ValKey::PRIMARY_CATEGORY]
|
368
368
|
secondary = @deploy_information[Deliverer::ValKey::SECONDARY_CATEGORY]
|
369
|
-
|
369
|
+
primary_subcategories = @deploy_information[Deliverer::ValKey::PRIMARY_SUBCATEGORIES]
|
370
|
+
secondary_subcategories = @deploy_information[Deliverer::ValKey::SECONDARY_SUBCATEGORIES]
|
371
|
+
itc.set_categories!(app, primary, secondary, primary_subcategories, secondary_subcategories) if (primary or secondary)
|
370
372
|
|
371
373
|
# App Rating
|
372
374
|
itc.set_app_rating!(app, @deploy_information[Deliverer::ValKey::RATINGS_CONFIG_PATH]) if @deploy_information[Deliverer::ValKey::RATINGS_CONFIG_PATH]
|
data/lib/deliver/deliverer.rb
CHANGED
@@ -40,6 +40,8 @@ module Deliver
|
|
40
40
|
COPYRIGHT = :copyright
|
41
41
|
PRIMARY_CATEGORY = :primary_category
|
42
42
|
SECONDARY_CATEGORY = :secondary_category
|
43
|
+
PRIMARY_SUBCATEGORIES = :primary_subcategories
|
44
|
+
SECONDARY_SUBCATEGORIES = :secondary_subcategories
|
43
45
|
|
44
46
|
AUTOMATIC_RELEASE = :automatic_release # should the update go live after approval
|
45
47
|
RATINGS_CONFIG_PATH = :ratings_config_path # a path to the configuration for the app's ratings
|
@@ -20,6 +20,7 @@ module Deliver
|
|
20
20
|
allowed = Deliver::Deliverer.all_available_keys_to_set
|
21
21
|
not_translated = [:ipa, :app_identifier, :apple_id, :screenshots_path, :config_json_folder,
|
22
22
|
:submit_further_information, :copyright, :primary_category, :secondary_category,
|
23
|
+
:primary_subcategories, :secondary_subcategories,
|
23
24
|
:automatic_release, :app_review_information, :ratings_config_path, :price_tier,
|
24
25
|
:app_icon, :apple_watch_app_icon]
|
25
26
|
|
@@ -52,41 +52,54 @@ module Deliver
|
|
52
52
|
error_occured(ex)
|
53
53
|
end
|
54
54
|
|
55
|
-
def set_categories!(app, primary, secondary)
|
55
|
+
def set_categories!(app, primary, secondary, primarySubs, secondarySubs)
|
56
56
|
verify_app(app)
|
57
57
|
open_app_page(app)
|
58
58
|
|
59
59
|
Helper.log.info "Setting primary/secondary category.'".green
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
60
|
+
|
61
|
+
set_category_dropdown(primary, "primaryCategory")
|
62
|
+
|
63
|
+
set_category_dropdown(secondary, "secondaryCategory")
|
64
|
+
|
65
|
+
if primarySubs
|
66
|
+
if primarySubs.length > 0
|
67
|
+
set_category_dropdown(primarySubs[0], "primaryFirstSubCategory")
|
67
68
|
end
|
68
|
-
if
|
69
|
-
|
69
|
+
if primarySubs.length > 1
|
70
|
+
set_category_dropdown(primarySubs[1], "primarySecondSubCategory")
|
70
71
|
end
|
71
72
|
end
|
72
73
|
|
73
|
-
if
|
74
|
-
|
75
|
-
|
76
|
-
category.select_option
|
77
|
-
secondary = nil
|
78
|
-
break
|
79
|
-
end
|
74
|
+
if secondarySubs
|
75
|
+
if secondarySubs.length > 0
|
76
|
+
set_category_dropdown(secondarySubs[0], "secondaryFirstSubCategory")
|
80
77
|
end
|
81
|
-
if
|
82
|
-
|
78
|
+
if secondarySubs.length > 1
|
79
|
+
set_category_dropdown(secondarySubs[1], "secondarySecondSubCategory")
|
83
80
|
end
|
84
81
|
end
|
85
82
|
|
86
|
-
|
87
83
|
(click_on "Save" rescue nil) # if nothing has changed, there is no back button and we don't care
|
88
84
|
rescue => ex
|
89
85
|
error_occured(ex)
|
90
86
|
end
|
87
|
+
|
88
|
+
private
|
89
|
+
|
90
|
+
def set_category_dropdown(value, catId)
|
91
|
+
if value
|
92
|
+
all("select[ng-model='versionInfo.#{catId}.value'] > option").each do |category|
|
93
|
+
if category.text.to_s == value.to_s
|
94
|
+
category.select_option
|
95
|
+
value = nil
|
96
|
+
break
|
97
|
+
end
|
98
|
+
end
|
99
|
+
if value
|
100
|
+
Helper.log.info "Could not find #{catId} '#{value}'. Make sure it's available on iTC".red
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
91
104
|
end
|
92
105
|
end
|
data/lib/deliver/version.rb
CHANGED
metadata
CHANGED
@@ -1,209 +1,209 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deliver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.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: 2015-
|
11
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.7.2
|
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
26
|
version: 0.7.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: credentials_manager
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.6.5
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.6.5
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: fastimage
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.6.3
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.6.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubyzip
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 1.1.6
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.1.6
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: plist
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 3.1.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 3.1.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: excon
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: bundler
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rake
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - ~>
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 3.1.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - ~>
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 3.1.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: pry
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: yard
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- - ~>
|
171
|
+
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: 0.8.7.4
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - ~>
|
178
|
+
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 0.8.7.4
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: webmock
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - ~>
|
185
|
+
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: 1.19.0
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- - ~>
|
192
|
+
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: 1.19.0
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: coveralls
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- -
|
199
|
+
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- -
|
206
|
+
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
description: Upload screenshots, metadata and your app to the App Store using a single
|
@@ -228,7 +228,7 @@ files:
|
|
228
228
|
- lib/deliver/app_metadata.rb
|
229
229
|
- lib/deliver/app_metadata_screenshots.rb
|
230
230
|
- lib/deliver/app_screenshot.rb
|
231
|
-
- lib/deliver/
|
231
|
+
- lib/deliver/commands_generator.rb
|
232
232
|
- lib/deliver/deliver_process.rb
|
233
233
|
- lib/deliver/deliverer.rb
|
234
234
|
- lib/deliver/deliverfile/deliverfile.rb
|
@@ -263,17 +263,17 @@ require_paths:
|
|
263
263
|
- lib
|
264
264
|
required_ruby_version: !ruby/object:Gem::Requirement
|
265
265
|
requirements:
|
266
|
-
- -
|
266
|
+
- - ">="
|
267
267
|
- !ruby/object:Gem::Version
|
268
268
|
version: 2.0.0
|
269
269
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
270
270
|
requirements:
|
271
|
-
- -
|
271
|
+
- - ">="
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
275
|
rubyforge_project:
|
276
|
-
rubygems_version: 2.4.
|
276
|
+
rubygems_version: 2.4.6
|
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
|
data/lib/deliver/commands.rb
DELETED