fastlane-plugin-validate_app 0.2.1 → 0.2.2

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
- SHA1:
3
- metadata.gz: b8d3e8ef9b50f594618caeb2ca5d1a5bccafacb4
4
- data.tar.gz: 0440afb4eb950734887b220d7b3485cfe407cc5e
2
+ SHA256:
3
+ metadata.gz: 23f1630229f7d4a28178a8e9f1aae956b172f77b34cf97de10827adbb86d548d
4
+ data.tar.gz: 0036edf06288f78fe88fa9742f01c38feef1cab8e7209c864e3587edd410ce0c
5
5
  SHA512:
6
- metadata.gz: e968f314c198c645a7d92544df4420fa839cbbb0e53ca15e1598920b9ea433ab47b60a9648832e4befab5dbddc94463fef083df7ef7366e25ac9a4338a353c7a
7
- data.tar.gz: 76145fa0cae4012f3d0c0d0dbf6e05022871665b80e551a264e9eab3d6587f4ec58942b848a31175bdb9540bcc95fbd292ca969c9bbb9115c3c414fee34481f9
6
+ metadata.gz: 6e28d8635adbf958cb1bd5bea00001346571218550514ea1fc38fd385951579a554af5f3d39b282a8ae49713a9a8da9c2f5fdd7193f55307c7d98f3c6f66bbda
7
+ data.tar.gz: fcbd928cd3533aab6422b5f0fb91f4ee93aebecbd417dccca2ccec67b2ba3af9a0b4de940670a67773e93c5bc082a5e9c8c46dfeb7823bab0f7202577163a8e3
@@ -10,31 +10,30 @@ 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
+ ENV["VALIDATE_APP_PASSWORD"] = ENV["FASTLANE_PASSWORD"] || ENV["DELIVER_PASSWORD"] || self.fetch_password_from_keychain
14
+
13
15
  ipa = params[:ipa].to_s.shellescape
16
+ username = params[:username]
17
+ password = "@env:VALIDATE_APP_PASSWORD"
14
18
 
15
19
  UI.message("Validating #{ipa}. This may take a while.")
16
20
 
17
- password = "@env:DELIVER_PASSWORD" if ENV["DELIVER_PASSWORD"].to_s.length > 0
18
- password = "@env:FASTLANE_PASSWORD" if ENV["FASTLANE_PASSWORD"].to_s.length > 0
19
-
20
- if password.to_s.empty?
21
- password = self.fetch_password_from_keychain
22
- end
23
-
24
21
  command = [altool]
25
22
  command << "--validate-app"
26
23
  command << "--file"
27
24
  command << ipa
28
- command << "--username #{params[:username]}"
25
+ command << "--username"
26
+ command << username
29
27
  command << "--password"
30
28
  command << password
31
29
  command << "--output-format xml"
32
30
 
33
- plist = Plist.parse_xml(`#{command.join(' ')}`)
31
+ result = Actions.sh(command.join(' '))
32
+ plist = Plist.parse_xml(result)
34
33
  errors = plist["product-errors"]
35
34
 
36
35
  if errors.nil?
37
- UI.success("IPA file is valid. Ready to be uploaded to iTunes Connect!")
36
+ UI.success(plist["success-message"])
38
37
  return nil
39
38
  end
40
39
 
@@ -84,7 +83,7 @@ module Fastlane
84
83
  description: "Path to the ipa file to validate",
85
84
  is_string: true,
86
85
  default_value: Dir["*.ipa"].sort_by { |x| File.mtime(x) }.last,
87
- optional: false,
86
+ optional: true,
88
87
  verify_block: proc do |value|
89
88
  value = File.expand_path(value)
90
89
  UI.user_error!("could not find ipa file at path '#{value}'") unless File.exist?(value)
@@ -96,7 +95,7 @@ module Fastlane
96
95
  description: "Your Apple ID username",
97
96
  is_string: true,
98
97
  default_value: @user,
99
- optional: false)
98
+ optional: true)
100
99
  ]
101
100
  end
102
101
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module ValidateApp
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-validate_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-20 00:00:00.000000000 Z
11
+ date: 2018-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.6.13
171
+ rubygems_version: 2.7.3
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Validate your build before uploading to iTunes Connect