deliver 0.4.0 → 0.4.1

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: 534a6b8ed220433bd502dfa2f7c788104f99da4a
4
- data.tar.gz: fa7864e238b1924e3cfc4e114404b88302e2ad2d
3
+ metadata.gz: 52e8b70dfa6c0a3bcb2392bb73968de6761b070f
4
+ data.tar.gz: 2e89716623be26e9086410b6b5c1ec635a1dd7ef
5
5
  SHA512:
6
- metadata.gz: 9611bb1d5a25ac9dd2db52685e48148dbb8437fef80eb8000cf89b920214272c7ba536938950264db6cea703900776a65dffa494e05c7bf7ca1827758b1c7095
7
- data.tar.gz: a4d905e853d4134dbca1a41fa3ad30f24974eb692d425103ca829880d6cd58c92740e614ec24b7f6b9e956237648b3bf92e09c903d760103b72525df6128e21f
6
+ metadata.gz: ccc2a8bebf9154313bcd5408f004d1478924b33b8a50938a73e30c955b6ddf83e406067e75bdef176c16535e1a1d344d5a55fb220e40ea3995cbf3f8190a90dd
7
+ data.tar.gz: b30db3e33eace1b85660bf6c2155f0cf0f19fc82675b48d09778b7d1e092c22f795ab4a89f9219357091d26a305e859550c45285091e25ce8a36dd47d5e37f72
data/README.md CHANGED
@@ -128,11 +128,11 @@ changelog({
128
128
  "de-DE" => "Dieses Update ist super"
129
129
  })
130
130
  ```
131
- If you wish to skip automated submission to review you can provide `--skip-deploy` option when calling `deliver`.
131
+ If you wish to skip automated submission to review you can provide `--skip-deploy` option when calling `deliver`. This will upload the ipa file and app metadata, but will not submit the app for review.
132
132
 
133
133
  #### Upload a new ipa for TestFlight beta testers
134
134
 
135
- In order to upload beta `.ipa` you need to specify beta_ipa path in your `Deliverfile`
135
+ In order to upload an `.ipa` file for Apple TestFlight you need to specify `beta_ipa` path in your `Deliverfile`
136
136
 
137
137
  ```ruby
138
138
  beta_ipa "./latest.ipa"
data/bin/deliver CHANGED
@@ -12,8 +12,8 @@ HighLine.track_eof = false
12
12
  # Commander
13
13
  program :version, Deliver::VERSION
14
14
  program :description, 'CLI for \'Deliver\' - Automate uploading of app metadata, screenshots and app updates to Apple'
15
- program :help, 'Author', 'Felix Krause <krausefx@gmail.com>'
16
- program :help, 'Website', 'http://felixkrause.at'
15
+ program :help, 'Author', 'Felix Krause <deliver@krausefx.com>'
16
+ program :help, 'Website', 'http://krausefx.com'
17
17
  program :help, 'GitHub', 'https://github.com/krausefx/deliver'
18
18
  program :help_formatter, :compact
19
19
 
@@ -44,10 +44,12 @@ end
44
44
 
45
45
  # ipa "./latest.ipa" # this can be used, if you prefer manually building the ipa file
46
46
 
47
+ # beta_ipa "./ad_hoc_build.ipa" # upload ipa file using `deliver --beta`
48
+
47
49
  # unit_tests do
48
50
  # system("xctool test")
49
51
  # end
50
52
 
51
53
  success do
52
54
  system("say 'Successfully deployed a new version.'")
53
- end
55
+ end
@@ -78,10 +78,17 @@ module Deliver
78
78
  elsif is_beta_build?
79
79
  used_ipa_file = @deploy_information[:beta_ipa]
80
80
  end
81
+
82
+ if used_ipa_file.kind_of?Proc
83
+ # The user provided a block. We only want to execute the block now, since it might be a long build step
84
+ used_ipa_file = used_ipa_file.call
85
+
86
+ Deliverfile::Deliverfile::DSL.validate_ipa!(used_ipa_file)
87
+ end
81
88
 
82
89
  if (used_ipa_file || '').length == 0 and is_beta_build?
83
90
  # Beta Release but no ipa given
84
- raise "Could not find an ipa file for 'beta' mode. Provide one using `beta_ipa do ... end`.".red
91
+ raise "Could not find an ipa file for 'beta' mode. Provide one using `beta_ipa do ... end` in your Deliverfile.".red
85
92
  end
86
93
 
87
94
  if used_ipa_file
@@ -84,21 +84,19 @@ module Deliver
84
84
  # Pass the path to the ipa file which should be uploaded
85
85
  # @raise (DeliverfileDSLError) occurs when you pass an invalid path to the
86
86
  # IPA file.
87
- def ipa(value = nil)
88
- value ||= yield if block_given?
89
- validate_ipa(value)
87
+ def ipa(value = nil, &block)
88
+ validate_ipa!(value) if value # to catch errors early
90
89
 
91
- @deliver_data.set_new_value(Deliverer::ValKey::IPA, value)
90
+ @deliver_data.set_new_value(Deliverer::ValKey::IPA, (value || block))
92
91
  end
93
92
 
94
93
  # Pass the path to the ipa file (beta version) which should be uploaded
95
94
  # @raise (DeliverfileDSLError) occurs when you pass an invalid path to the
96
95
  # IPA file.
97
- def beta_ipa(value = nil)
98
- value ||= yield if block_given?
99
- validate_ipa(value)
96
+ def beta_ipa(value = nil, &block)
97
+ validate_ipa!(value) if value # to catch errors early
100
98
 
101
- @deliver_data.set_new_value(Deliverer::ValKey::BETA_IPA, value)
99
+ @deliver_data.set_new_value(Deliverer::ValKey::BETA_IPA, (value || block))
102
100
  end
103
101
 
104
102
  # This will set the email address of the Apple ID to be used
@@ -124,11 +122,13 @@ module Deliver
124
122
  @deliver_data.set_new_value(Deliverer::ValKey::APP_VERSION, value)
125
123
  end
126
124
 
127
- private
128
- def validate_ipa(value)
129
- raise DeliverfileDSLError.new(INVALID_IPA_FILE_GIVEN.red) unless value
130
- raise DeliverfileDSLError.new(INVALID_IPA_FILE_GIVEN.red) unless value.include?".ipa"
131
- end
125
+ # Only verifies the file type of the ipa path and if the file can be found. Is also called from deliver_process
126
+ # This will raise a DeliverfileDSLError if something goes wrong
127
+ def self.validate_ipa!(value)
128
+ raise DeliverfileDSLError.new(INVALID_IPA_FILE_GIVEN.red) unless value
129
+ raise DeliverfileDSLError.new(INVALID_IPA_FILE_GIVEN.red) unless value.kind_of?String
130
+ raise DeliverfileDSLError.new(INVALID_IPA_FILE_GIVEN.red) unless value.include?".ipa"
131
+ end
132
132
  end
133
133
  end
134
134
  end
@@ -72,6 +72,7 @@ module Deliver
72
72
  begin
73
73
  transporter.upload(@app, @metadata_dir)
74
74
  rescue Exception => ex
75
+ Helper.log.debug ex
75
76
  is_okay = ex.to_s.include?"ready exists a binary upload with build" # this just means, the ipa is already online
76
77
  end
77
78
 
@@ -1,3 +1,3 @@
1
1
  module Deliver
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-17 00:00:00.000000000 Z
11
+ date: 2014-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json