fastlane-plugin-validate_app 0.1.0 → 0.2.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: 657462245474ab242aa582b07eb947f5c3751348
4
- data.tar.gz: '0802de059b331ff8d2ade46dec0313123e1181e8'
3
+ metadata.gz: 72c3a22f09166d36795a608b4dab6c4ace6ed3b1
4
+ data.tar.gz: 9296a0b40d77fbb60944fd7f5bdef51f985e70ab
5
5
  SHA512:
6
- metadata.gz: 9e0c29d4834c9da4ed2513d81dae5832ecdd6e660a3223dc4e4037b07d807dc7fa26f1f55268ba8b495bcb5e5c1aacd30090ca4fb7bdec1170076925ced9f777
7
- data.tar.gz: 9c3067d5fb9dfbb224e8f821b9d86c3a77115982a1f3e5dd0583dc51c7fe8a3aebc7aaa116c224cfd2b4fba09eb0ea57b354e91ea58bce8f49ec0fd7249c3fca
6
+ metadata.gz: cd2e62471bee904b5b98d49ded36fc536446ba37001b6d378b634e6f90678521ab30842bf76103d0df1390dd8481e7a7ba3baf42c2dad0b6b6cc7893414c54a6
7
+ data.tar.gz: 65c489b4566325b1bb8b3c5ede7b3b9526c2d065819b56cba3b4c91559355c7bc29ff9658ea4ae296f6eeb53eef8fe466d33490d211effa796ba8d6d7791b27a
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # validate_app plugin
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-validate_app)
4
+ [![CircleCI](https://circleci.com/gh/thii/fastlane-plugin-validate_app.svg?style=svg)](https://circleci.com/gh/thii/fastlane-plugin-validate_app)
4
5
 
5
6
  ## Getting Started
6
7
 
@@ -20,7 +21,7 @@ Appfile and password from yoru Keychain. You may specify a password directly or
20
21
  pass it via `FASTLANE_PASSWORD` or `DELIVER_PASSWORD` environment variables.
21
22
  Your password will not be printed out to build console log.
22
23
 
23
- Returns an empty array if build is valid, and an array of error objects if
24
+ Returns `nil` if build is valid, and an array of error objects if
24
25
  build is invalid
25
26
 
26
27
  ## Example
@@ -30,7 +31,7 @@ errors = validate_app(
30
31
  ipa: "YourApp.ipa"
31
32
  )
32
33
 
33
- if errors.empty?
34
+ if errors.nil?
34
35
  upload_to_testflight
35
36
  else
36
37
  UI.user_error! "IPA file did not pass validation."
@@ -10,9 +10,8 @@ module Fastlane
10
10
  xcode_contents_path = `dirname "$(xcode-select --print-path)"`.strip
11
11
  altool = "#{xcode_contents_path}/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool".shellescape
12
12
 
13
- UI.message "Validating your app. This may take a while."
13
+ UI.message("Validating your app. This may take a while.")
14
14
 
15
- username = params[:username]
16
15
  password = "@env:DELIVER_PASSWORD" if ENV["DELIVER_PASSWORD"].to_s.length > 0
17
16
  password = "@env:FASTLANE_PASSWORD" if ENV["FASTLANE_PASSWORD"].to_s.length > 0
18
17
 
@@ -23,22 +22,22 @@ module Fastlane
23
22
  command = [altool]
24
23
  command << "--validate-app"
25
24
  command << "--file"
26
- command << "#{params[:ipa]}".shellescape
25
+ command << params[:ipa].to_s.shellescape
27
26
  command << "--username #{params[:username]}"
28
27
  command << "--password"
29
28
  command << password
30
29
  command << "--output-format xml"
31
30
 
32
- plist = Plist.parse_xml `#{command.join(' ')}`
31
+ plist = Plist.parse_xml(`#{command.join(' ')}`)
33
32
  errors = plist["product-errors"]
34
33
 
35
34
  if errors.empty?
36
- UI.success "Build is valid. Ready to be uploaded to iTunes Connect!"
37
- return []
35
+ UI.success("Build is valid. Ready to be uploaded to iTunes Connect!")
36
+ return nil
38
37
  end
39
38
 
40
39
  errors.each do |error|
41
- UI.error error["message"]
40
+ UI.error(error["message"])
42
41
  end
43
42
 
44
43
  errors
@@ -53,7 +52,7 @@ module Fastlane
53
52
  end
54
53
 
55
54
  def self.return_value
56
- "Returns an empty array if build is valid, and an array of error objects if build is invalid"
55
+ "Returns nil if build is valid, and an array of error objects if build is invalid"
57
56
  end
58
57
 
59
58
  def self.details
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module ValidateApp
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-validate_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thi