deliver 0.9.0.pre2 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbb3cf4785750f0e7da41a6e530de252562c5ebb
4
- data.tar.gz: 0c9586db31a2f63b1b747c705f2d041ae443ea5f
3
+ metadata.gz: e6cf52ea7c54cff537c5076e467d2855dd71b86f
4
+ data.tar.gz: 66b241359283c9750d4deab05d260b1b9c6713ac
5
5
  SHA512:
6
- metadata.gz: 9f9fe6e20a9951fd3e4a1485d7fac7472b4bbba87da747deb7a812c1bb522bdda4a234ca74f99b232a34689b080c6abb0d56e25278952233208a5ce9280ca895
7
- data.tar.gz: e9cdc4647a9eccea4b9e9f531315c7d069c5d156b094485c43d0ea7a0cfdf54d6be9b643f6eaeafd65133b36f77d5e088ba0c851fdaf664dda49189a7edaf973
6
+ metadata.gz: f688f771ef3201824dc3f4d0786dfca5232c5c52fa102ac1296958febd8aa5ea7dfe495806ee9a1392d004e7bb7c5ecae3249c82ace132fa259b10c5865ffd9a
7
+ data.tar.gz: 67a0bb0f6c225a00f59549e6859b534a764e7a71dee4e6d3c56ee557c176e9fff41d71be166bbb71db3f15f775f22409db011231f687e5d7352ce217f966bda1
data/README.md CHANGED
@@ -116,6 +116,8 @@ You can pass the "What to Test" value using the environment variable `DELIVER_WH
116
116
  DELIVER_WHAT_TO_TEST="Try the brand new project button" deliver testflight
117
117
  ```
118
118
 
119
+ Additional environment variables: `DELIVER_BETA_DESCRIPTION`, `DELIVER_BETA_FEEDBACK_EMAIL`.
120
+
119
121
  # Quick Start
120
122
 
121
123
 
@@ -18,7 +18,7 @@ class FastlaneApplication
18
18
  program :help, 'GitHub', 'https://github.com/krausefx/deliver'
19
19
  program :help_formatter, :compact
20
20
 
21
- global_option '--force', 'Runs a deployment without verifying any information (PDF file). This can be used for build servers.'
21
+ global_option '-f', '--force', 'Runs a deployment without verifying any information (PDF file). This can be used for build servers.'
22
22
  global_option '--beta', 'Upload a beta build to iTunes Connect. This uses the `beta_ipa` block.'
23
23
  global_option '--skip-deploy', 'Skips submission of the build on iTunes Connect. This will only upload the ipa and/or metadata.'
24
24
 
@@ -9,10 +9,10 @@
9
9
  # This part is only relevant, if you want to submit a new binary
10
10
  # If you don't use fastlane (https://github.com/KrauseFx/fastlane)
11
11
  # you can set the path to your ipa file using:
12
- # ipa './app.ip'
12
+ # ipa "./app.ipa"
13
13
 
14
14
  # to provide an ipa file for TestFlight distribution, use beta_ipa
15
- # beta_ipa './app.ip'
15
+ # beta_ipa "./app.ipa"
16
16
 
17
17
  # The version of your app - remove this if you provide an ipa file
18
18
  version "[[APP_VERSION]]"
@@ -17,10 +17,10 @@
17
17
  # This part is only relevant, if you want to submit a new binary
18
18
  # If you don't use fastlane (https://github.com/KrauseFx/fastlane)
19
19
  # you can set the path to your ipa file using:
20
- # ipa './app.ip'
20
+ # ipa "./app.ipa"
21
21
 
22
22
  # to provide an ipa file for TestFlight distribution, use beta_ipa
23
- # beta_ipa './app.ip'
23
+ # beta_ipa "./app.ipa"
24
24
 
25
25
  # The version of your app - remove this if you provide an ipa file
26
26
  version "[[APP_VERSION]]"
@@ -41,7 +41,14 @@ module Deliver
41
41
  elsif app_identifier and not apple_id
42
42
  # Fetch the Apple ID based on the given app identifier
43
43
  begin
44
- self.apple_id = FastlaneCore::ItunesSearchApi.fetch_by_identifier(app_identifier)['trackId']
44
+ begin
45
+ self.apple_id = FastlaneCore::ItunesSearchApi.fetch_by_identifier(app_identifier)['trackId']
46
+ rescue
47
+ Helper.log.warn "App doesn't seem to be in the App Store yet or is not available in the US App Store. Using the iTC API instead."
48
+ # Use the iTunes Connect API instead: make that default in the future
49
+ self.apple_id = FastlaneCore::ItunesConnect.new.find_apple_id(app_identifier)
50
+ raise "Couldn't find Apple ID" unless self.apple_id
51
+ end
45
52
  rescue
46
53
  unless Helper.is_test?
47
54
  Helper.log.info "Could not find Apple ID based on the app identifier in the US App Store. Maybe the app is not yet in the store?".yellow
@@ -126,6 +133,12 @@ module Deliver
126
133
  itc.upload_app_icon!(self, path)
127
134
  end
128
135
 
136
+ # Uploads a new apple watch app icon to iTunesConnect. This uses a headless browser
137
+ # which makes this command quite slow.
138
+ # @param (path) a path to the new apple watch app icon. The image must have the resolution of 1024x1024
139
+ def upload_apple_watch_app_icon!(path)
140
+ itc.upload_apple_watch_app_icon!(self, path)
141
+ end
129
142
  #####################################################
130
143
  # @!group Destructive/Constructive methods
131
144
  #####################################################
@@ -16,6 +16,8 @@ module Deliver
16
16
  IOS_55 = "iOS-5.5-in"
17
17
  # iPad
18
18
  IOS_IPAD = "iOS-iPad"
19
+ #  Watch
20
+ IOS_APPLE_WATCH= "iOS-Apple-Watch"
19
21
  # Mac
20
22
  MAC = "Mac"
21
23
  end
@@ -106,6 +108,9 @@ module Deliver
106
108
  [1440, 900],
107
109
  [2880, 1800],
108
110
  [2560, 1600]
111
+ ],
112
+ ScreenSize::IOS_APPLE_WATCH=> [
113
+ [312, 390]
109
114
  ]
110
115
  }
111
116
 
@@ -288,6 +288,9 @@ module Deliver
288
288
 
289
289
  # App Icon
290
290
  itc.upload_app_icon!(@app, @deploy_information[Deliverer::ValKey::APP_ICON]) if @deploy_information[Deliverer::ValKey::APP_ICON]
291
+
292
+ # Apple Watch App Icon
293
+ itc.upload_apple_watch_app_icon!(@app, @deploy_information[Deliverer::ValKey::APPLE_WATCH_APP_ICON]) if @deploy_information[Deliverer::ValKey::APPLE_WATCH_APP_ICON]
291
294
  end
292
295
 
293
296
  def trigger_ipa_upload
@@ -35,7 +35,8 @@ module Deliver
35
35
  SUBMIT_FURTHER_INFORMATION = :submit_further_information # export compliance, content rights and advertising identifier
36
36
  PRICE_TIER = :price_tier
37
37
  APP_ICON = :app_icon
38
-
38
+ APPLE_WATCH_APP_ICON = :apple_watch_app_icon
39
+
39
40
  COPYRIGHT = :copyright
40
41
  PRIMARY_CATEGORY = :primary_category
41
42
  SECONDARY_CATEGORY = :secondary_category
@@ -21,7 +21,7 @@ module Deliver
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
23
  :automatic_release, :app_review_information, :ratings_config_path, :price_tier,
24
- :app_icon]
24
+ :app_icon, :apple_watch_app_icon]
25
25
 
26
26
  if allowed.include?(method_sym)
27
27
  value = arguments.first
@@ -5,6 +5,7 @@ require 'deliver/itunes_connect/itunes_connect_submission'
5
5
  require 'deliver/itunes_connect/itunes_connect_reader'
6
6
  require 'deliver/itunes_connect/itunes_connect_new_version'
7
7
  require 'deliver/itunes_connect/itunes_connect_app_icon'
8
+ require 'deliver/itunes_connect/itunes_connect_apple_watch_app_icon'
8
9
  require 'deliver/itunes_connect/itunes_connect_app_rating'
9
10
  require 'deliver/itunes_connect/itunes_connect_additional'
10
11
  require 'deliver/itunes_connect/itunes_connect_screenshot_fetcher'
@@ -23,7 +23,7 @@ module Deliver
23
23
 
24
24
  Helper.log.info "Starting upload of new app icon".green
25
25
 
26
- evaluate_script("$('.appversionicon > .ios7-style-icon').prev().click()") # delete button
26
+ evaluate_script("$('.appversionicon:not(.watchIcon) > .ios7-style-icon').prev().click()") # delete button
27
27
  evaluate_script("$('[style-class=\"appversionicon rounded\"] [itc-launch-filechooser] + input').attr('id', 'deliverFileUploadInput')") # set div
28
28
  evaluate_script("URL = webkitURL; URL.createObjectURL = function(){return 'blob:abc'}"); # shim URL
29
29
  page.attach_file("deliverFileUploadInput", path) # add file
@@ -0,0 +1,42 @@
1
+ require 'fastimage'
2
+
3
+ module Deliver
4
+ class ItunesConnect < FastlaneCore::ItunesConnect
5
+ # Uploading a new full size app icon
6
+
7
+ def upload_apple_watch_app_icon!(app, path)
8
+ path = File.expand_path(path)
9
+ raise "Could not find watch app icon at path '#{path}'".red unless File.exists?path
10
+
11
+ size = FastImage.size(path)
12
+ raise "Watch App icon must have the resolution of 1024x1024px".red unless (size[0] == 1024 and size[1] == 1024)
13
+
14
+ # Remove alpha channel
15
+ Helper.log.info "Removing alpha channel from provided Watch App Icon (iTunes Connect requirement)".green
16
+
17
+ `sips -s format bmp '#{path}' &> /dev/null ` # &> /dev/null since there is warning because of the extension
18
+ `sips -s format png '#{path}'`
19
+
20
+ begin
21
+ verify_app(app)
22
+ open_app_page(app)
23
+
24
+ Helper.log.info "Starting upload of new watch app icon".green
25
+
26
+ evaluate_script("$('.ico.icon-chevron-animate-open-close.close').click()") # delete button
27
+ evaluate_script("$('.appversionicon.watchIcon > .ios7-style-icon').prev().click()") # delete button
28
+ evaluate_script("$('[style-class=\"appversionicon watchIcon rounded\"] [itc-launch-filechooser] + input').attr('id', 'deliverFileUploadInputWatch')") # set div
29
+ evaluate_script("URL = webkitURL; URL.createObjectURL = function(){return 'blob:abc'}"); # shim URL
30
+ page.attach_file("deliverFileUploadInputWatch", path) # add file
31
+
32
+ sleep 10
33
+
34
+ click_on "Save"
35
+
36
+ Helper.log.info "Finished uploading the new watch app icon".green
37
+ rescue => ex
38
+ error_occured(ex)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -40,7 +40,7 @@ module Deliver
40
40
  end
41
41
 
42
42
  # We got the most recent build, let's see if it's ready
43
- if current_build['internalState'] == 'inactive' and current_build['readyToInstall'] == true
43
+ if current_build['readyToInstall'] == true
44
44
  Helper.log.info "Build is ready 3.2.1...".green
45
45
  break # Success!
46
46
  end
@@ -180,7 +180,7 @@ module Deliver
180
180
 
181
181
  def build_download_command(username, password, apple_id, destination = "/tmp")
182
182
  [
183
- Helper.transporter_path,
183
+ '"' + Helper.transporter_path + '"',
184
184
  "-m lookupMetadata",
185
185
  "-u \"#{username}\"",
186
186
  "-p '#{escaped_password(password)}'",
@@ -191,7 +191,7 @@ module Deliver
191
191
 
192
192
  def build_upload_command(username, password, source = "/tmp")
193
193
  [
194
- Helper.transporter_path,
194
+ '"' + Helper.transporter_path + '"',
195
195
  "-m upload",
196
196
  "-u \"#{username}\"",
197
197
  "-p '#{escaped_password(password)}'",
@@ -11,6 +11,7 @@ module Deliver
11
11
  app_identifier = IpaFileAnalyser.fetch_app_identifier(ipa_path)
12
12
  app_identifier ||= ENV["TESTFLIGHT_APP_IDENTITIFER"] || ask("Could not automatically find the app identifier, please enter the app's bundle identifier: ")
13
13
  app_id ||= (FastlaneCore::ItunesSearchApi.fetch_by_identifier(app_identifier)['trackId'] rescue nil)
14
+ app_id ||= (FastlaneCore::ItunesConnect.new.find_apple_id(app_identifier) rescue nil)
14
15
  app_id ||= ENV["TESTFLIGHT_APPLE_ID"] || ask("Could not automatically find the app ID, please enter it here (e.g. 956814360): ")
15
16
  strategy = (skip_deploy ? Deliver::IPA_UPLOAD_STRATEGY_JUST_UPLOAD : Deliver::IPA_UPLOAD_STRATEGY_BETA_BUILD)
16
17
 
@@ -1,3 +1,3 @@
1
1
  module Deliver
2
- VERSION = "0.9.0.pre2"
2
+ VERSION = "0.9.0"
3
3
  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: 0.9.0.pre2
4
+ version: 0.9.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-03-29 00:00:00.000000000 Z
11
+ date: 2015-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.4.3
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
- version: 0.2.0
26
+ version: 0.4.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -241,6 +241,7 @@ files:
241
241
  - lib/deliver/itunes_connect/itunes_connect_additional.rb
242
242
  - lib/deliver/itunes_connect/itunes_connect_app_icon.rb
243
243
  - lib/deliver/itunes_connect/itunes_connect_app_rating.rb
244
+ - lib/deliver/itunes_connect/itunes_connect_apple_watch_app_icon.rb
244
245
  - lib/deliver/itunes_connect/itunes_connect_new_version.rb
245
246
  - lib/deliver/itunes_connect/itunes_connect_reader.rb
246
247
  - lib/deliver/itunes_connect/itunes_connect_screenshot_fetcher.rb
@@ -265,9 +266,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
265
266
  version: 2.0.0
266
267
  required_rubygems_version: !ruby/object:Gem::Requirement
267
268
  requirements:
268
- - - '>'
269
+ - - '>='
269
270
  - !ruby/object:Gem::Version
270
- version: 1.3.1
271
+ version: '0'
271
272
  requirements: []
272
273
  rubyforge_project:
273
274
  rubygems_version: 2.2.2