deliver 1.14.5 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2451302ab0fe0651f35ae79ed7f69fdcc16e2ef
4
- data.tar.gz: e75fb3abbeb2afec9211739476126654708c10dc
3
+ metadata.gz: 567c701cbd4630a8b139b6278f6e5cb49c5b0dfe
4
+ data.tar.gz: a761b179cc3bca74f4494ba076e4ab5047f334c0
5
5
  SHA512:
6
- metadata.gz: c7db0ec409517aae6e0b236369caf0708afdc0ad2b6ff216d3d6320e8102d26b485c284a00aae45c4a5e88e0c8d4b2f340e08bc454d50725605e1a1a8add453f
7
- data.tar.gz: ee14c485603cb01b8bf4b420d0905fdfb79b8c4720baec26fe38b9f30ce6c3c316477728f28fe558dfa32c1ee6afa87130ca9e797aed4678991e6c1a36f7125b
6
+ metadata.gz: a0009f8d3812b6b22d7a5143ed3cf6c7ac92ac97cd1fa141508b5298ab752838284dd3068ab84f01e392d8184b98e5f0b11c11bc44630b940074ed53f903722a
7
+ data.tar.gz: d9ac5993789ba8dc0c6da99c7d9dc1ac056c01702acea60d51091b022bfeb1927524229ddc6a185251f6ba8e113177b905595211ac30a6422b3c2e82ad035417
data/README.md CHANGED
@@ -192,7 +192,7 @@ Imagine that you have localised data for the following language codes: ```en-US
192
192
 
193
193
  You can set the following in your deliverfile
194
194
 
195
- ```
195
+ ```ruby
196
196
  release_notes({
197
197
  'default' => "Shiny and new”,
198
198
  'de-DE' => "glänzend und neu"
@@ -14,6 +14,22 @@ module Deliver
14
14
  FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
15
15
  end
16
16
 
17
+ def deliverfile_options(skip_verification: false)
18
+ available_options = Deliver::Options.available_options
19
+ return available_options unless skip_verification
20
+
21
+ # These don't matter for downloading metadata, so verification can be skipped
22
+ irrelevant_options_keys = [:ipa, :pkg, :app_rating_config_path]
23
+
24
+ available_options.each do |opt|
25
+ next unless irrelevant_options_keys.include?(opt.key)
26
+ opt.verify_block = nil
27
+ opt.conflicting_options = nil
28
+ end
29
+
30
+ return available_options
31
+ end
32
+
17
33
  def run
18
34
  program :version, Deliver::VERSION
19
35
  program :description, Deliver::DESCRIPTION
@@ -22,7 +38,7 @@ module Deliver
22
38
  program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/deliver'
23
39
  program :help_formatter, :compact
24
40
 
25
- FastlaneCore::CommanderGenerator.new.generate(Deliver::Options.available_options)
41
+ FastlaneCore::CommanderGenerator.new.generate(deliverfile_options)
26
42
 
27
43
  global_option('--verbose') { $verbose = true }
28
44
 
@@ -32,7 +48,7 @@ module Deliver
32
48
  c.syntax = 'deliver'
33
49
  c.description = 'Upload metadata and binary to iTunes Connect'
34
50
  c.action do |args, options|
35
- options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
51
+ options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__)
36
52
  loaded = options.load_configuration_file("Deliverfile")
37
53
  loaded = true if options[:description] || options[:ipa] || options[:pkg] # do we have *anything* here?
38
54
  unless loaded
@@ -51,7 +67,7 @@ module Deliver
51
67
  c.syntax = 'deliver submit_build'
52
68
  c.description = 'Submit a specific build-nr for review, use latest for the latest build'
53
69
  c.action do |args, options|
54
- options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
70
+ options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__)
55
71
  options.load_configuration_file("Deliverfile")
56
72
  options[:submit_for_review] = true
57
73
  options[:build_number] = "latest" unless options[:build_number]
@@ -68,7 +84,7 @@ module Deliver
68
84
  end
69
85
 
70
86
  require 'deliver/setup'
71
- options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
87
+ options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__)
72
88
  Deliver::Runner.new(options) # to login...
73
89
  Deliver::Setup.new.run(options)
74
90
  end
@@ -78,7 +94,7 @@ module Deliver
78
94
  c.syntax = 'deliver generate_summary'
79
95
  c.description = 'Generate HTML Summary without uploading/downloading anything'
80
96
  c.action do |args, options|
81
- options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
97
+ options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__)
82
98
  options.load_configuration_file("Deliverfile")
83
99
  Deliver::Runner.new(options)
84
100
  html_path = Deliver::GenerateSummary.new.run(options)
@@ -92,9 +108,9 @@ module Deliver
92
108
  c.description = "Downloads all existing screenshots from iTunes Connect and stores them in the screenshots folder"
93
109
 
94
110
  c.action do |args, options|
95
- options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
111
+ options = FastlaneCore::Configuration.create(deliverfile_options(skip_verification: true), options.__hash__)
96
112
  options.load_configuration_file("Deliverfile")
97
- Deliver::Runner.new(options) # to login...
113
+ Deliver::Runner.new(options, skip_version: true) # to login...
98
114
  containing = FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.'
99
115
  path = options[:screenshots_path] || File.join(containing, 'screenshots')
100
116
  Deliver::DownloadScreenshots.run(options, path)
@@ -106,20 +122,25 @@ module Deliver
106
122
  c.description = "Downloads existing metadata and stores it locally. This overwrites the local files."
107
123
 
108
124
  c.action do |args, options|
109
- options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
125
+ options = FastlaneCore::Configuration.create(deliverfile_options(skip_verification: true), options.__hash__)
110
126
  options.load_configuration_file("Deliverfile")
111
127
  Deliver::Runner.new(options) # to login...
112
128
  containing = FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.'
113
129
  path = options[:metadata_path] || File.join(containing, 'metadata')
114
130
  res = ENV["DELIVER_FORCE_OVERWRITE"]
115
131
  res ||= UI.confirm("Do you want to overwrite existing metadata on path '#{File.expand_path(path)}'?")
116
- if res
117
- require 'deliver/setup'
118
- v = options[:app].latest_version
119
- Deliver::Setup.new.generate_metadata_files(v, path)
120
- else
121
- return 0
132
+ return 0 unless res
133
+
134
+ require 'deliver/setup'
135
+ v = options[:app].latest_version
136
+ if options[:app_version].to_s.length > 0
137
+ v = options[:app].live_version if v.version != options[:app_version]
138
+ if v.version != options[:app_version]
139
+ raise "Neither the current nor live version match specified app_version \"#{options[:app_version]}\""
140
+ end
122
141
  end
142
+
143
+ Deliver::Setup.new.generate_metadata_files(v, path)
123
144
  end
124
145
  end
125
146
 
@@ -1,10 +1,10 @@
1
1
  module Deliver
2
2
  class DetectValues
3
- def run!(options)
3
+ def run!(options, skip_params = {})
4
4
  find_app_identifier(options)
5
5
  find_app(options)
6
6
  find_folders(options)
7
- find_version(options)
7
+ find_version(options) unless skip_params[:skip_version]
8
8
  end
9
9
 
10
10
  def find_app_identifier(options)
@@ -18,6 +18,8 @@ module Deliver
18
18
 
19
19
  options[:app_identifier] = identifier if identifier.to_s.length > 0
20
20
  options[:app_identifier] ||= UI.input("The Bundle Identifier of your App: ")
21
+ rescue
22
+ UI.user_error!("Could not infer your App's Bundle Identifier")
21
23
  end
22
24
 
23
25
  def find_app(options)
@@ -41,11 +43,15 @@ module Deliver
41
43
  end
42
44
 
43
45
  def find_version(options)
46
+ return if options[:app_version]
47
+
44
48
  if options[:ipa]
45
49
  options[:app_version] ||= FastlaneCore::IpaFileAnalyser.fetch_app_version(options[:ipa])
46
50
  elsif options[:pkg]
47
51
  options[:app_version] ||= FastlaneCore::PkgFileAnalyser.fetch_app_version(options[:pkg])
48
52
  end
53
+ rescue
54
+ UI.user_error!("Could not infer your app's version")
49
55
  end
50
56
  end
51
57
  end
@@ -159,6 +159,11 @@ module Deliver
159
159
  env_name: "DELIVER_ITC_PROVIDER",
160
160
  description: "The provider short name to be used with the iTMSTransporter to identify your team",
161
161
  optional: true),
162
+ FastlaneCore::ConfigItem.new(key: :overwrite_screenshots,
163
+ env_name: "DELIVER_OVERWRITE_SCREENSHOTS",
164
+ description: "Clear all previously uploaded screenshots before uploading the new ones",
165
+ is_string: false,
166
+ default_value: false),
162
167
 
163
168
  # App Metadata
164
169
  # Non Localised
@@ -2,10 +2,10 @@ module Deliver
2
2
  class Runner
3
3
  attr_accessor :options
4
4
 
5
- def initialize(options)
5
+ def initialize(options, skip_auto_detection = {})
6
6
  self.options = options
7
7
  login
8
- Deliver::DetectValues.new.run!(self.options)
8
+ Deliver::DetectValues.new.run!(self.options, skip_auto_detection)
9
9
  FastlaneCore::PrintTable.print_values(config: options, hide_keys: [:app], mask_keys: ['app_review_information.demo_password'], title: "deliver #{Deliver::VERSION} Summary")
10
10
  end
11
11
 
@@ -10,20 +10,32 @@ module Deliver
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...")
13
+ screenshots_per_language = screenshots.group_by(&:language)
13
14
 
14
- # First, clear all previously uploaded screenshots, but only where we have new ones
15
- # screenshots.each do |screenshot|
16
- # to_remove = v.screenshots[screenshot.language].find_all do |current|
17
- # current.device_type == screenshot.device_type
18
- # end
19
- # to_remove.each { |t| t.reset! }
20
- # end
21
- # This part is not working yet...
15
+ if options[:overwrite_screenshots]
16
+ UI.message("Removing all previously uploaded screenshots...")
17
+ # First, clear all previously uploaded screenshots
18
+ screenshots_per_language.keys.each do |language|
19
+ v.screenshots[language].each_with_index do |t, index|
20
+ v.upload_screenshot!(nil, index, t.language, t.device_type)
21
+ end
22
+ end
23
+ end
22
24
 
23
25
  # Now, fill in the new ones
24
26
  indized = {} # per language and device type
25
27
 
26
- screenshots_per_language = screenshots.group_by(&:language)
28
+ enabled_languages = screenshots_per_language.keys
29
+ if enabled_languages.count > 0
30
+ v.create_languages(enabled_languages)
31
+ lng_text = "language"
32
+ lng_text += "s" if enabled_languages.count != 1
33
+ UI.message("Activating #{lng_text} #{enabled_languages.join(', ')}...")
34
+ v.save!
35
+ # This refreshes the app version from iTC after enabling a localization
36
+ v = app.edit_version
37
+ end
38
+
27
39
  screenshots_per_language.each do |language, screenshots_for_language|
28
40
  UI.message("Uploading #{screenshots_for_language.length} screenshots for language #{language}")
29
41
  screenshots_for_language.each do |screenshot|
@@ -1,4 +1,4 @@
1
1
  module Deliver
2
- VERSION = "1.14.5"
2
+ VERSION = "1.15.0"
3
3
  DESCRIPTION = 'Upload screenshots, metadata and your app to the App Store using a single command'
4
4
  end
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.14.5
4
+ version: 1.15.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-10-25 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 0.36.2
59
+ version: 0.37.0
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.36.2
69
+ version: 0.37.0
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.6.6
313
+ rubygems_version: 2.5.1
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