deliver 0.13.5 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -208
  3. data/bin/deliver +1 -1
  4. data/lib/assets/DeliverfileDefault +2 -22
  5. data/lib/assets/summary.html.erb +27 -39
  6. data/lib/deliver.rb +16 -14
  7. data/lib/deliver/app_screenshot.rb +43 -33
  8. data/lib/deliver/commands_generator.rb +30 -108
  9. data/lib/deliver/detect_values.rb +23 -0
  10. data/lib/deliver/download_screenshots.rb +30 -9
  11. data/lib/deliver/html_generator.rb +7 -8
  12. data/lib/deliver/options.rb +126 -0
  13. data/lib/deliver/runner.rb +75 -0
  14. data/lib/deliver/setup.rb +84 -0
  15. data/lib/deliver/submit_for_review.rb +60 -0
  16. data/lib/deliver/upload_assets.rb +22 -0
  17. data/lib/deliver/upload_metadata.rb +100 -0
  18. data/lib/deliver/upload_price_tier.rb +21 -0
  19. data/lib/deliver/upload_screenshots.rb +63 -0
  20. data/lib/deliver/version.rb +2 -1
  21. metadata +37 -62
  22. data/lib/assets/DeliverLanguageMapping.json +0 -187
  23. data/lib/assets/DeliverfileExample +0 -38
  24. data/lib/deliver/app.rb +0 -167
  25. data/lib/deliver/app_metadata.rb +0 -419
  26. data/lib/deliver/app_metadata_screenshots.rb +0 -189
  27. data/lib/deliver/deliver_process.rb +0 -426
  28. data/lib/deliver/deliverer.rb +0 -138
  29. data/lib/deliver/deliverfile/deliverfile.rb +0 -35
  30. data/lib/deliver/deliverfile/deliverfile_creator.rb +0 -135
  31. data/lib/deliver/deliverfile/dsl.rb +0 -142
  32. data/lib/deliver/dependency_checker.rb +0 -19
  33. data/lib/deliver/ipa_file_analyser.rb +0 -44
  34. data/lib/deliver/ipa_uploader.rb +0 -148
  35. data/lib/deliver/itunes_connect/itunes_connect.rb +0 -12
  36. data/lib/deliver/itunes_connect/itunes_connect_additional.rb +0 -105
  37. data/lib/deliver/itunes_connect/itunes_connect_app_icon.rb +0 -41
  38. data/lib/deliver/itunes_connect/itunes_connect_app_rating.rb +0 -90
  39. data/lib/deliver/itunes_connect/itunes_connect_apple_watch_app_icon.rb +0 -42
  40. data/lib/deliver/itunes_connect/itunes_connect_information.rb +0 -34
  41. data/lib/deliver/itunes_connect/itunes_connect_new_version.rb +0 -67
  42. data/lib/deliver/itunes_connect/itunes_connect_reader.rb +0 -46
  43. data/lib/deliver/itunes_connect/itunes_connect_screenshot_fetcher.rb +0 -54
  44. data/lib/deliver/itunes_connect/itunes_connect_submission.rb +0 -282
  45. data/lib/deliver/itunes_transporter.rb +0 -221
  46. data/lib/deliver/metadata_item.rb +0 -94
  47. data/lib/deliver/testflight.rb +0 -27
@@ -1,10 +1,9 @@
1
1
  require 'fastimage'
2
2
 
3
-
4
3
  module Deliver
5
- # AppScreenshot represents one screenshots for one specific locale and
4
+ # AppScreenshot represents one screenshots for one specific locale and
6
5
  # device type.
7
- class AppScreenshot < MetadataItem
6
+ class AppScreenshot
8
7
  module ScreenSize
9
8
  # iPhone 4
10
9
  IOS_35 = "iOS-3.5-in"
@@ -16,8 +15,8 @@ module Deliver
16
15
  IOS_55 = "iOS-5.5-in"
17
16
  # iPad
18
17
  IOS_IPAD = "iOS-iPad"
19
- # Watch
20
- IOS_APPLE_WATCH= "iOS-Apple-Watch"
18
+ # Apple Watch
19
+ IOS_APPLE_WATCH = "iOS-Apple-Watch"
21
20
  # Mac
22
21
  MAC = "Mac"
23
22
  end
@@ -26,12 +25,17 @@ module Deliver
26
25
  # specified at {Deliver::ScreenSize}
27
26
  attr_accessor :screen_size
28
27
 
28
+ attr_accessor :path
29
+
30
+ attr_accessor :language
31
+
29
32
  # @param path (String) path to the screenshot file
33
+ # @param path (String) Language of this screenshot (e.g. English)
30
34
  # @param screen_size (Deliver::AppScreenshot::ScreenSize) the screen size, which
31
35
  # will automatically be calculated when you don't set it.
32
- def initialize(path, screen_size = nil)
33
- super(path)
34
-
36
+ def initialize(path, language, screen_size = nil)
37
+ self.path = path
38
+ self.language = language
35
39
  screen_size ||= self.class.calculate_screen_size(path)
36
40
 
37
41
  self.screen_size = screen_size
@@ -39,41 +43,47 @@ module Deliver
39
43
  Helper.log.error "Looks like the screenshot given (#{path}) does not match the requirements of #{screen_size}" unless self.is_valid?
40
44
  end
41
45
 
42
- def create_xml_node(doc, order_index)
43
- node = super(doc)
44
-
45
- # Screenshots have a slightly different xml code
46
-
47
- # <software_screenshot display_target="iOS-4-in" position="1">
48
- # <size>295276</size>
49
- # <file_name>1-en-4-StartScreen.png</file_name>
50
- # <checksum type="md5">c00bd122a3ffbc79e26f1ae6210c7efd</checksum>
51
- # </software_screenshot>
52
-
53
-
54
- node['display_target'] = self.screen_size
55
- node['position'] = order_index
56
-
57
- return node
46
+ # The iTC API requires a different notation for the device
47
+ def device_type
48
+ matching = {
49
+ ScreenSize::IOS_35 => "iphone35",
50
+ ScreenSize::IOS_40 => "iphone4",
51
+ ScreenSize::IOS_47 => "iphone6",
52
+ ScreenSize::IOS_55 => "iphone6Plus",
53
+ ScreenSize::IOS_IPAD => "ipad",
54
+ ScreenSize::MAC => "mac",
55
+ ScreenSize::IOS_APPLE_WATCH => "Watch"
56
+ }
57
+ return matching[self.screen_size]
58
58
  end
59
59
 
60
- def name_for_xml_node
61
- 'software_screenshot'
60
+ # Nice name
61
+ def formatted_name
62
+ matching = {
63
+ ScreenSize::IOS_35 => "iPhone 4",
64
+ ScreenSize::IOS_40 => "iPhone 5",
65
+ ScreenSize::IOS_47 => "iPhone 6",
66
+ ScreenSize::IOS_55 => "iPhone 6 Plus",
67
+ ScreenSize::IOS_IPAD => "iPad",
68
+ ScreenSize::MAC => "Mac",
69
+ ScreenSize::IOS_APPLE_WATCH => "Watch"
70
+ }
71
+ return matching[self.screen_size]
62
72
  end
63
73
 
64
74
  # Validates the given screenshots (size and format)
75
+ # rubocop:disable Style/PredicateName
65
76
  def is_valid?
66
- return false unless ["png", "PNG", "jpg", "JPG", "jpeg", "JPEG"].include? self.path.split(".").last
67
-
68
- size = FastImage.size(self.path)
77
+ return false unless ["png", "PNG", "jpg", "JPG", "jpeg", "JPEG"].include?(self.path.split(".").last)
69
78
 
70
79
  return self.screen_size == self.class.calculate_screen_size(self.path)
71
80
  end
81
+ # rubocop:enable Style/PredicateName
72
82
 
73
83
  def self.calculate_screen_size(path)
74
84
  size = FastImage.size(path)
75
85
 
76
- raise "Could not find or parse file at path '#{path}'" if (size == nil or size.count == 0)
86
+ raise "Could not find or parse file at path '#{path}'" if size.nil? or size.count == 0
77
87
 
78
88
  devices = {
79
89
  ScreenSize::IOS_55 => [
@@ -109,7 +119,7 @@ module Deliver
109
119
  [2880, 1800],
110
120
  [2560, 1600]
111
121
  ],
112
- ScreenSize::IOS_APPLE_WATCH=> [
122
+ ScreenSize::IOS_APPLE_WATCH => [
113
123
  [312, 390]
114
124
  ]
115
125
  }
@@ -117,7 +127,7 @@ module Deliver
117
127
  devices.each do |device_type, array|
118
128
  array.each do |resolution|
119
129
  if (size[0] == resolution[0] and size[1] == resolution[1]) or # portrait
120
- (size[1] == resolution[0] and size[0] == resolution[1]) # landscape
130
+ (size[1] == resolution[0] and size[0] == resolution[1]) # landscape
121
131
  return device_type
122
132
  end
123
133
  end
@@ -128,4 +138,4 @@ module Deliver
128
138
  end
129
139
 
130
140
  ScreenSize = AppScreenshot::ScreenSize
131
- end
141
+ end
@@ -7,149 +7,71 @@ module Deliver
7
7
  class CommandsGenerator
8
8
  include Commander::Methods
9
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
10
+ def self.start
11
+ FastlaneCore::UpdateChecker.start_looking_for_update('deliver')
12
+ self.new.run
13
+ ensure
14
+ FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
18
15
  end
19
16
 
20
- def run(def_command = nil)
21
- def_command ||= :run
17
+ def run
22
18
  program :version, Deliver::VERSION
23
- program :description, 'CLI for \'deliver\' - Upload screenshots, metadata and your app to the App Store using a single command'
19
+ program :description, Deliver::DESCRIPTION
24
20
  program :help, 'Author', 'Felix Krause <deliver@krausefx.com>'
25
21
  program :help, 'Website', 'https://fastlane.tools'
26
22
  program :help, 'GitHub', 'https://github.com/krausefx/deliver'
27
23
  program :help_formatter, :compact
28
24
 
29
- always_trace!
25
+ FastlaneCore::CommanderGenerator.new.generate(Deliver::Options.available_options)
30
26
 
31
- global_option '-f', '--force', 'Runs a deployment without verifying any information (PDF file). This can be used for build servers.'
32
- global_option '--beta', 'Upload a beta build to iTunes Connect. This uses the `beta_ipa` block.'
33
- global_option '--skip-deploy', 'Skips submission of the build on iTunes Connect. This will only upload the ipa and/or metadata.'
34
-
35
- def show_itc_error
36
- Helper.log.fatal "A big iTunes Connect Update was released on 24th September".red
37
- Helper.log.fatal "Most parts of `deliver` don't work with it (yet)".red
38
- Helper.log.fatal "I'm working on an update for deliver to push a new version ASAP".red
39
- Helper.log.fatal "More information about the current status on GitHub".red
40
- Helper.log.fatal "https://github.com/KrauseFx/deliver/issues/337".red
41
- Helper.log.fatal "https://github.com/KrauseFx/deliver/pull/259".red
42
- sleep 5
43
- end
27
+ global_option('--verbose') { $verbose = true }
44
28
 
45
- show_itc_error
29
+ always_trace!
46
30
 
47
31
  command :run do |c|
48
32
  c.syntax = 'deliver'
49
- c.description = 'Run a deploy process using the Deliverfile in the current folder'
50
- c.action do |args, options|
51
- run_deliver(options)
52
- end
53
- end
54
-
55
- command :upload_metadata do |c|
56
- c.syntax = 'deliver upload_metadata'
57
- c.description = "Uploads new app metadata only. No binary will be uploaded"
33
+ c.description = 'Upload metadata and binary to iTunes Connect'
58
34
  c.action do |args, options|
59
- ENV["DELIVER_SKIP_BINARY"] = "1"
60
- run_deliver(options)
61
- end
62
- end
63
-
64
- def run_deliver(options)
65
- path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
66
- Dir.chdir(path) do # switch the context
67
- if File.exists?(deliver_path)
68
- # Everything looks alright, use the given Deliverfile
69
- options.default :beta => false, :skip_deploy => false
70
- Deliver::Deliverer.new(deliver_path, force: options.force, is_beta_ipa: options.beta, skip_deploy: options.skip_deploy)
71
- else
72
- Deliver::Helper.log.warn("No Deliverfile found at path '#{deliver_path}'.")
73
- if agree("Do you want to create a new Deliverfile at the current directory? (y/n)", true)
74
- Deliver::DeliverfileCreator.create(enclosed_directory)
75
- end
76
- end
35
+ options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
36
+ options.load_configuration_file("Deliverfile")
37
+ Deliver::Runner.new(options).run
77
38
  end
78
39
  end
79
40
 
80
41
  command :init do |c|
81
42
  c.syntax = 'deliver init'
82
- c.option '-u', '--username String', String, 'Your Apple ID'
83
- c.description = "Creates a new Deliverfile in the current directory"
84
-
43
+ c.description = 'Create the initial `deliver` configuration based on an existing app'
85
44
  c.action do |args, options|
86
- set_username(options.username)
45
+ if File.exist?("Deliverfile") or File.exist?("fastlane/Deliverfile")
46
+ Helper.log.info "You already got a running deliver setup in this directory".yellow
47
+ return 0
48
+ end
87
49
 
88
- path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
89
- Deliver::DeliverfileCreator.create(path)
50
+ require 'deliver/setup'
51
+ options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
52
+ Deliver::Runner.new(options) # to login...
53
+ Deliver::Setup.new.run(options)
90
54
  end
91
55
  end
92
56
 
93
57
  command :download_screenshots do |c|
94
58
  c.syntax = 'deliver download_screenshots'
95
59
  c.description = "Downloads all existing screenshots from iTunes Connect and stores them in the screenshots folder"
96
- c.option '-a', '--app_identifier String', String, 'The App Identifier (e.g. com.krausefx.app)'
97
- c.option '-u', '--username String', String, 'Your Apple ID'
98
- c.action do |args, options|
99
- set_username(options.username)
100
-
101
- app_identifier = options.app_identifier || CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) || ask("Please enter the app's bundle identifier: ")
102
- app = Deliver::App.new(app_identifier: app_identifier)
103
-
104
- path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.')
105
- path = File.join(path, "deliver")
106
-
107
- Deliver::DownloadScreenshots.run(app, path)
108
- end
109
- end
110
-
111
- command :testflight do |c|
112
- c.syntax = 'deliver testflight'
113
- c.description = "Uploads a given ipa file to the new Apple TestFlight"
114
- c.option '-a', '--app_id String', String, 'The App ID (numeric, like 956814360)'
115
- c.option '-u', '--username String', String, 'Your Apple ID'
116
60
 
117
61
  c.action do |args, options|
118
- ipa_path = (args.first || determine_ipa) + '' # unfreeze the string
62
+ options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
63
+ options.load_configuration_file("Deliverfile")
64
+ Deliver::Runner.new(options) # to login...
119
65
 
120
- set_username(options.username)
66
+ path = (FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.')
121
67
 
122
- Deliver::Testflight.upload!(ipa_path, options.app_id, options.skip_deploy)
68
+ Deliver::DownloadScreenshots.run(options, path)
123
69
  end
124
70
  end
125
71
 
126
- def set_username(username)
127
- user = username
128
- user ||= ENV["DELIVER_USERNAME"]
129
- user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
130
- CredentialsManager::PasswordManager.shared_manager(user) if user
131
- end
132
-
133
- def determine_ipa
134
- return Dir['*.ipa'].first if Dir["*.ipa"].count == 1
135
- loop do
136
- path = ask("Path to IPA file to upload: ".green)
137
- return path if File.exists?(path)
138
- end
139
- end
140
-
141
- def deliver_path
142
- File.join(enclosed_directory, Deliver::Deliverfile::Deliverfile::FILE_NAME)
143
- end
144
-
145
- # The directoy in which the Deliverfile and metadata should be created
146
- def enclosed_directory
147
- "."
148
- end
149
-
150
- default_command def_command
72
+ default_command :run
151
73
 
152
74
  run!
153
75
  end
154
76
  end
155
- end
77
+ end
@@ -0,0 +1,23 @@
1
+ module Deliver
2
+ class DetectValues
3
+ def run!(options)
4
+ find_app(options)
5
+ find_folders(options)
6
+ end
7
+
8
+ def find_app(options)
9
+ search_by = options[:app_identifier]
10
+ search_by = options[:app] if search_by.to_s.length == 0
11
+ options[:app] = Spaceship::Application.find(search_by)
12
+ end
13
+
14
+ def find_folders(options)
15
+ containing = Helper.fastlane_enabled? ? './fastlane' : '.'
16
+ options[:screenshots_path] ||= File.join(containing, 'screenshots')
17
+ options[:metadata_folder] ||= File.join(containing, 'metadata')
18
+
19
+ FileUtils.mkdir_p(options[:screenshots_path])
20
+ FileUtils.mkdir_p(options[:metadata_folder])
21
+ end
22
+ end
23
+ end
@@ -1,14 +1,35 @@
1
1
  module Deliver
2
2
  class DownloadScreenshots
3
- def self.run(app, path)
4
- begin
5
- Helper.log.info "Downloading all existing screenshots...".green
6
- ItunesConnect.new.download_existing_screenshots(app, path)
7
- Helper.log.info "Successfully downloaded all existing screenshots".green
8
- rescue Exception => ex
9
- Helper.log.error ex
10
- Helper.log.error "Couldn't download already existing screenshots from iTunesConnect.".red
3
+ def self.run(options, path)
4
+ Helper.log.info "Downloading all existing screenshots...".green
5
+ download(options, path)
6
+ Helper.log.info "Successfully downloaded all existing screenshots".green
7
+ rescue => ex
8
+ Helper.log.error ex
9
+ Helper.log.error "Couldn't download already existing screenshots from iTunesConnect.".red
10
+ end
11
+
12
+ def self.download(options, folder_path)
13
+ v = options[:app].latest_version
14
+
15
+ v.screenshots.each do |language, screenshots|
16
+ screenshots.each do |screenshot|
17
+ file_name = [screenshot.sort_order, screenshot.device_type, screenshot.sort_order].join("_")
18
+ original_file_extension = File.basename(screenshot.original_file_name)
19
+ file_name += "." + original_file_extension
20
+
21
+ Helper.log.info "Downloading existing screenshot '#{file_name}'"
22
+
23
+ containing_folder = File.join(folder_path, "screenshots", screenshot.language)
24
+ begin
25
+ FileUtils.mkdir_p(containing_folder)
26
+ rescue
27
+ # if it's already there
28
+ end
29
+ path = File.join(containing_folder, file_name)
30
+ File.write(path, open(screenshot.url).read)
31
+ end
11
32
  end
12
33
  end
13
34
  end
14
- end
35
+ end
@@ -1,21 +1,20 @@
1
1
  module Deliver
2
2
  class HtmlGenerator
3
- # Renders all data available in the Deliverer to quickly see if everything was correctly generated.
4
- # @param deliverer [Deliver::Deliverer] The deliver process on which based the HTML file should be generated
5
- # @param export_path (String) The path to a folder where the resulting HTML file should be stored.
6
- def render(deliverer, export_path = nil)
3
+ # Renders all data available to quickly see if everything was correctly generated.
4
+ # @param export_path (String) The path to a folder where the resulting HTML file should be stored.
5
+ def render(options, screenshots, export_path = nil)
7
6
  lib_path = Helper.gem_path('deliver')
8
-
9
- @data = deliverer.app.metadata.information
7
+
8
+ @screenshots = screenshots || []
9
+ @options = options
10
10
 
11
11
  html_path = File.join(lib_path, "lib/assets/summary.html.erb")
12
12
  html = ERB.new(File.read(html_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system
13
13
 
14
- export_path ||= ENV["DELIVER_HTML_EXPORT_PATH"] || '.' # DELIVER_HTML_EXPORT_PATH used in tests to use /tmp
15
14
  export_path = File.join(export_path, "Preview.html")
16
15
  File.write(export_path, html)
17
16
 
18
17
  return export_path
19
18
  end
20
19
  end
21
- end
20
+ end
@@ -0,0 +1,126 @@
1
+ require 'fastlane_core'
2
+ require 'credentials_manager'
3
+
4
+ module Deliver
5
+ class Options
6
+ def self.available_options
7
+ @options ||= [
8
+ FastlaneCore::ConfigItem.new(key: :username,
9
+ short_option: "-u",
10
+ env_name: "DELIVER_USERNAME",
11
+ description: "Your Apple ID Username",
12
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)),
13
+ FastlaneCore::ConfigItem.new(key: :app_identifier,
14
+ short_option: "-a",
15
+ env_name: "DELIVER_APP_IDENTIFIER",
16
+ description: "The bundle identifier of your app",
17
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
18
+ FastlaneCore::ConfigItem.new(key: :app,
19
+ short_option: "-p",
20
+ env_name: "DELIVER_APP_ID",
21
+ description: "The app ID of the app you want to use/modify",
22
+ is_string: false), # don't add any verification here, as it's used to store a spaceship ref
23
+ FastlaneCore::ConfigItem.new(key: :ipa,
24
+ short_option: "-i",
25
+ optional: true,
26
+ env_name: "DELIVER_IPA_PATH",
27
+ description: "Path to your ipa file",
28
+ default_value: Dir["*.ipa"].first,
29
+ verify_block: proc do |value|
30
+ raise "Could not find ipa file at path '#{value}'".red unless File.exist?(value)
31
+ raise "'#{value}' doesn't seem to be an ipa file".red unless value.end_with?(".ipa")
32
+ end),
33
+ FastlaneCore::ConfigItem.new(key: :metadata_folder,
34
+ short_option: '-m',
35
+ description: "Path to the folder containing the metadata files",
36
+ optional: true),
37
+ FastlaneCore::ConfigItem.new(key: :screenshots_path,
38
+ short_option: '-w',
39
+ description: "Path to the folder containing the screenshots",
40
+ optional: true),
41
+ FastlaneCore::ConfigItem.new(key: :skip_metadata,
42
+ description: "Only upload the build - no metadata",
43
+ is_string: false,
44
+ default_value: false),
45
+ FastlaneCore::ConfigItem.new(key: :force,
46
+ short_option: "-f",
47
+ description: "Skip the HTML file verification",
48
+ is_string: false,
49
+ default_value: false),
50
+ FastlaneCore::ConfigItem.new(key: :submit_for_review,
51
+ description: "Submit the new version for Review after uploading everything",
52
+ is_string: false,
53
+ default_value: false),
54
+ FastlaneCore::ConfigItem.new(key: :price_tier,
55
+ short_option: "-r",
56
+ description: "The price tier of this application",
57
+ is_string: false,
58
+ optional: true),
59
+
60
+ # App Metadata
61
+ # Non Localised
62
+ FastlaneCore::ConfigItem.new(key: :app_icon,
63
+ description: "Metadata: The path to the app icon",
64
+ optional: true,
65
+ short_option: "-l",
66
+ verify_block: proc do |value|
67
+ raise "Could not find png file at path '#{value}'".red unless File.exist?(value)
68
+ raise "'#{value}' doesn't seem to be a png file".red unless value.end_with?(".png")
69
+ end),
70
+ FastlaneCore::ConfigItem.new(key: :apple_watch_app_icon,
71
+ description: "Metadata: The path to the Apple Watch app icon",
72
+ optional: true,
73
+ short_option: "-q",
74
+ verify_block: proc do |value|
75
+ raise "Could not find png file at path '#{value}'".red unless File.exist?(value)
76
+ raise "'#{value}' doesn't seem to be a png file".red unless value.end_with?(".png")
77
+ end),
78
+ FastlaneCore::ConfigItem.new(key: :copyright,
79
+ description: "Metadata: The copyright notice",
80
+ optional: true,
81
+ is_string: true),
82
+ FastlaneCore::ConfigItem.new(key: :primary_category,
83
+ description: "Metadata: The english name of the primary category(e.g. `Business`, `Books`)",
84
+ optional: true,
85
+ is_string: true),
86
+ FastlaneCore::ConfigItem.new(key: :secondary_category,
87
+ description: "Metadata: The english name of the secondary category(e.g. `Business`, `Books`)",
88
+ optional: true,
89
+ is_string: true),
90
+ FastlaneCore::ConfigItem.new(key: :app_review_information,
91
+ description: "Metadata: A hash containing the review information",
92
+ optional: true,
93
+ is_string: false),
94
+ # Localised
95
+ FastlaneCore::ConfigItem.new(key: :description,
96
+ description: "Metadata: The localised app description",
97
+ optional: true,
98
+ is_string: false),
99
+ FastlaneCore::ConfigItem.new(key: :name,
100
+ description: "Metadata: The localised app name",
101
+ optional: true,
102
+ is_string: false),
103
+ FastlaneCore::ConfigItem.new(key: :keywords,
104
+ description: "Metadata: An array of localised keywords",
105
+ optional: true,
106
+ is_string: false),
107
+ FastlaneCore::ConfigItem.new(key: :release_notes,
108
+ description: "Metadata: Localised release notes for this version",
109
+ optional: true,
110
+ is_string: false),
111
+ FastlaneCore::ConfigItem.new(key: :privacy_url,
112
+ description: "Metadata: Localised privacy url",
113
+ optional: true,
114
+ is_string: false),
115
+ FastlaneCore::ConfigItem.new(key: :support_url,
116
+ description: "Metadata: Localised support url",
117
+ optional: true,
118
+ is_string: false),
119
+ FastlaneCore::ConfigItem.new(key: :marketing_url,
120
+ description: "Metadata: Localised marketing url",
121
+ optional: true,
122
+ is_string: false)
123
+ ]
124
+ end
125
+ end
126
+ end