deliver 1.7.0 → 1.8.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: f073822a6cd5ae489648e54a348982bc98b71122
4
- data.tar.gz: a7deac2ad9c35042803c15bb4aff5b3d5ad21b36
3
+ metadata.gz: 058d53f7f022fadeeb57b82e356342d9c8be41d8
4
+ data.tar.gz: 6fa0490789ee508fb13280919f7bd9bfe40340b9
5
5
  SHA512:
6
- metadata.gz: d4c40f724deea58194fe74a1bbedb431f126a267ddbfa43ddf4427f5cadf6543d1ae4ad0183b5041946c94d32c3842476076ecab8fd9cf12693bdd29ebebf97f
7
- data.tar.gz: e25d930ab3d631813f91bac218101961ad1ecce5ad04ad1acbb941c0768dec7bffd1aba26db5838a9e4bad325487400c59842e523070e673ca93db5f907b3646
6
+ metadata.gz: f464d750c0c6a40c8e9f7a5013c27a411ce67dea972a95ccec0dcda00b9959d08271653579c2c58a82961e28f915aabf4e03dfec5f58bb72c440fc8d532d2b44
7
+ data.tar.gz: 2a77467718336a69895e98ed452969bd4b293f94d4b88235861b4a36b3320d87f82ca60e06997db9e5ed788f18ea7e0bdd665b271e6f2ea2ecab8f40599633ab
data/README.md CHANGED
@@ -36,7 +36,7 @@ deliver
36
36
 
37
37
  ###### Upload screenshots, metadata and your app to the App Store using a single command
38
38
 
39
- `deliver` can upload ipa files, app screenshots and more to iTunes Connect from the command line.
39
+ `deliver` can upload ipa or pkg files, app screenshots and more to iTunes Connect from the command line.
40
40
 
41
41
  Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.com/FastlaneTools)
42
42
 
@@ -56,7 +56,7 @@ Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.c
56
56
 
57
57
  # Features
58
58
  - Upload hundreds of localised screenshots completely automatically
59
- - Upload a new ipa file to iTunes Connect without Xcode from any Mac
59
+ - Upload a new ipa/pkg file to iTunes Connect without Xcode from any Mac
60
60
  - Maintain your app metadata locally and push changes back to iTunes Connect
61
61
  - Easily implement a real Continuous Deployment process using [fastlane](https://fastlane.tools)
62
62
  - Store the configuration in git to easily deploy from **any** Mac, including your Continuous Integration server
@@ -110,7 +110,13 @@ Provide the path to an `ipa` file to upload and submit your app for review:
110
110
  deliver --ipa "App.ipa" --submit_for_review
111
111
  ```
112
112
 
113
- If you use [fastlane](https://fastlane.tools) you don't have to manually specify the path to your `ipa` file.
113
+ or you can specify path to `pkg` file for Mac OS X apps:
114
+
115
+ ```
116
+ deliver --pkg "MacApp.pkg"
117
+ ```
118
+
119
+ If you use [fastlane](https://fastlane.tools) you don't have to manually specify the path to your `ipa`/`pkg` file.
114
120
 
115
121
  This is just a small sub-set of what you can do with `deliver`, check out the full documentation in [Deliverfile.md](https://github.com/fastlane/deliver/blob/master/Deliverfile.md)
116
122
 
@@ -36,7 +36,7 @@ module Deliver
36
36
  c.action do |args, options|
37
37
  options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__)
38
38
  loaded = options.load_configuration_file("Deliverfile")
39
- loaded = true if options[:description] || options[:ipa] # do we have *anything* here?
39
+ loaded = true if options[:description] || options[:ipa] || options[:pkg] # do we have *anything* here?
40
40
  unless loaded
41
41
  if agree("No deliver configuration found in the current directory. Do you want to setup deliver? (y/n)".yellow, true)
42
42
  require 'deliver/setup'
@@ -12,9 +12,11 @@ module Deliver
12
12
 
13
13
  if options[:ipa]
14
14
  identifier = FastlaneCore::IpaFileAnalyser.fetch_app_identifier(options[:ipa])
15
- options[:app_identifier] = identifier if identifier.to_s.length > 0
15
+ elsif options[:pkg]
16
+ identifier = FastlaneCore::PkgFileAnalyser.fetch_app_identifier(options[:pkg])
16
17
  end
17
18
 
19
+ options[:app_identifier] = identifier if identifier.to_s.length > 0
18
20
  options[:app_identifier] ||= ask("The Bundle Identifier of your App: ")
19
21
  end
20
22
 
@@ -41,6 +43,8 @@ module Deliver
41
43
  def find_version(options)
42
44
  if options[:ipa]
43
45
  options[:app_version] ||= FastlaneCore::IpaFileAnalyser.fetch_app_version(options[:ipa])
46
+ elsif options[:pkg]
47
+ options[:app_version] ||= FastlaneCore::PkgFileAnalyser.fetch_app_version(options[:pkg])
44
48
  end
45
49
  end
46
50
  end
@@ -33,6 +33,24 @@ module Deliver
33
33
  verify_block: proc do |value|
34
34
  raise "Could not find ipa file at path '#{value}'".red unless File.exist?(value)
35
35
  raise "'#{value}' doesn't seem to be an ipa file".red unless value.end_with?(".ipa")
36
+ end,
37
+ conflicting_options: [:pkg],
38
+ conflict_block: proc do |value|
39
+ raise "You can't use 'ipa' and '#{value.key}' options in one run.".red
40
+ end),
41
+ FastlaneCore::ConfigItem.new(key: :pkg,
42
+ short_option: "-c",
43
+ optional: true,
44
+ env_name: "DELIVER_PKG_PATH",
45
+ description: "Path to your pkg file",
46
+ default_value: Dir["*.pkg"].first,
47
+ verify_block: proc do |value|
48
+ raise "Could not find pkg file at path '#{value}'".red unless File.exist?(value)
49
+ raise "'#{value}' doesn't seem to be a pkg file".red unless value.end_with?(".pkg")
50
+ end,
51
+ conflicting_options: [:ipa],
52
+ conflict_block: proc do |value|
53
+ raise "You can't use 'pkg' and '#{value.key}' options in one run.".red
36
54
  end),
37
55
  FastlaneCore::ConfigItem.new(key: :metadata_path,
38
56
  short_option: '-m',
@@ -19,7 +19,7 @@ module Deliver
19
19
  def run
20
20
  verify_version if options[:app_version].to_s.length > 0
21
21
  upload_metadata
22
- upload_binary if options[:ipa]
22
+ upload_binary if options[:ipa] || options[:pkg]
23
23
 
24
24
  Helper.log.info "Finished the upload to iTunes Connect".green
25
25
 
@@ -59,11 +59,19 @@ module Deliver
59
59
  # Upload the binary to iTunes Connect
60
60
  def upload_binary
61
61
  Helper.log.info "Uploading binary to iTunes Connect"
62
- package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
63
- app_id: options[:app].apple_id,
64
- ipa_path: options[:ipa],
65
- package_path: "/tmp"
66
- )
62
+ if options[:ipa]
63
+ package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
64
+ app_id: options[:app].apple_id,
65
+ ipa_path: options[:ipa],
66
+ package_path: "/tmp"
67
+ )
68
+ elsif options[:pkg]
69
+ package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
70
+ app_id: options[:app].apple_id,
71
+ pkg_path: options[:pkg],
72
+ package_path: "/tmp"
73
+ )
74
+ end
67
75
 
68
76
  transporter = FastlaneCore::ItunesTransporter.new(options[:username])
69
77
  transporter.upload(options[:app].apple_id, package_path)
@@ -2,16 +2,12 @@ module Deliver
2
2
  class Setup
3
3
  def run(options)
4
4
  containing = (File.directory?("fastlane") ? 'fastlane' : '.')
5
- create_based_on_identifier(containing, options)
5
+ file_path = File.join(containing, 'Deliverfile')
6
+ data = generate_deliver_file(containing, options)
7
+ setup_deliver(file_path, data, containing, options)
6
8
  end
7
9
 
8
- # This will download all the app metadata and store its data into JSON files
9
- # @param deliver_path (String) The directory in which the Deliverfile should be created
10
- # @param identifier (String) The app identifier we want to create Deliverfile based on
11
- # @param project_name (String) The default name of the project, which is used in the generated Deliverfile
12
- def create_based_on_identifier(deliver_path, options)
13
- file_path = File.join(deliver_path, 'Deliverfile')
14
- data = generate_deliver_file(deliver_path, options)
10
+ def setup_deliver(file_path, data, deliver_path, options)
15
11
  File.write(file_path, data)
16
12
 
17
13
  download_screenshots(deliver_path, options)
@@ -34,7 +30,6 @@ module Deliver
34
30
  deliver = File.read("#{gem_path}/lib/assets/DeliverfileDefault")
35
31
  deliver.gsub!("[[APP_IDENTIFIER]]", options[:app].bundle_id)
36
32
  deliver.gsub!("[[USERNAME]]", Spaceship::Tunes.client.user)
37
-
38
33
  return deliver
39
34
  end
40
35
 
@@ -1,4 +1,4 @@
1
1
  module Deliver
2
- VERSION = "1.7.0"
2
+ VERSION = "1.8.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.7.0
4
+ version: 1.8.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-12 00:00:00.000000000 Z
11
+ date: 2016-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core