fastlane-plugin-validate_ipa 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: 6bebd28290473d2dc17cfa353f1d23938a6c82f0b546309539a52817562be270
4
- data.tar.gz: 027e8c55323151f12db5b1214235895c31e288bf975f7db2f541a67199d1b18d
3
+ metadata.gz: 7d8f6fe6e998ad8fe3bfbed02f20d40482db037aa56968323951fec29ac4fa7e
4
+ data.tar.gz: fb345db9cc3bf3a6fb0c7574c194dfe4c0afb328427b51148402508a2308f40b
5
5
  SHA512:
6
- metadata.gz: b440dddeb7534128c676c7a511a4d39709849f263129691698752089200470d5b3cc775512adba9d7edc3ef000cd9475a919baa49183b2cb28531291f90256d5
7
- data.tar.gz: 0ce12de710cb90abe323c95cce3e2bdcdb72f12ad690686c93ef72d50e136b65b23a014f59827b637c1cf27945c1ea148ceda7dc7b5b6cd32116fc0b355ab546
6
+ metadata.gz: 70329968c42bbf7584a8637bf4e2b001d73739466de3e3325922199e2c2d71f47968360128a5f940d07eebf7358c98bb021036a5d5760ffcf731d86028b6e998
7
+ data.tar.gz: d791f7807856078c4d587315bcfb6d661268cbe0dce38ef4b02c044350cc8d161a75eb3c1d80fcea0cea829826a8ba1410c241fab2a253f716913568064f8c41
@@ -6,8 +6,8 @@ module Fastlane
6
6
  class ValidateIpaAction < Action
7
7
  def self.run(params)
8
8
  UI.message "Start IPA validation."
9
-
10
- command = ["xcrun", " altool"]
9
+
10
+ command = ["xcrun", "altool"]
11
11
  command << "--validate-app"
12
12
  command << "--file"
13
13
  command << params[:path]
@@ -20,13 +20,14 @@ module Fastlane
20
20
  command << "--output-format xml"
21
21
  command << "| tr -d '\n'"
22
22
 
23
- result = sh(command.join(" "))
23
+ output = sh(command.join(" "))
24
+ split_result = output.split("\n")
25
+ result = split_result[-1]
24
26
  plist = Plist.parse_xml(result)
25
27
  errors = plist["product-errors"]
26
-
28
+
27
29
  if errors.nil?
28
30
  UI.success("IPA validation success => " + plist["success-message"])
29
- return nil
30
31
  else
31
32
  reason = errors
32
33
  .each_with_index
@@ -34,7 +35,6 @@ module Fastlane
34
35
  .join(" ")
35
36
  UI.error("IPA validation failure => " + reason)
36
37
  UI.user_error!("IPA validation failure.")
37
- return errors
38
38
  end
39
39
  end
40
40
 
@@ -48,36 +48,40 @@ module Fastlane
48
48
 
49
49
  def self.available_options
50
50
  [
51
- FastlaneCore::ConfigItem.new(key: :path,
52
- env_name: "FL_VALIDATE_IPA_PATH",
53
- description: "IPA Path",
54
- is_string: true,
55
- verify_block: proc do |value|
56
- UI.user_error!("Path is not valid.") unless (value and not value.empty?)
57
- end),
58
- FastlaneCore::ConfigItem.new(key: :platform,
59
- env_name: "FL_VALIDATE_IPA_PLATFORM",
60
- description: "IPA Platform",
61
- is_string: true,
62
- verify_block: proc do |value|
63
- UI.user_error!("Platform is not valid.") unless (value and not value.empty?)
64
- platform = %w(ios macos)
65
- UI.user_error!("Unsupported platform. (Supported platforms : #{platform})") unless platform.include?(value)
66
- end),
67
- FastlaneCore::ConfigItem.new(key: :username,
68
- env_name: "FL_VALIDATE_IPA_USERNAME",
69
- description: "Apple ID",
70
- is_string: true,
71
- verify_block: proc do |value|
72
- UI.user_error!("Apple ID is not valid.") unless (value and not value.empty?)
73
- end),
74
- FastlaneCore::ConfigItem.new(key: :password,
75
- env_name: "FL_VALIDATE_IPA_PASSWORD",
76
- description: "Apple ID or App-specific password",
77
- is_string: true,
78
- verify_block: proc do |value|
79
- UI.user_error!("Apple ID or App-specific password is not valid.") unless (value and not value.empty?)
80
- end)
51
+ FastlaneCore::ConfigItem.new(
52
+ key: :path,
53
+ env_name: "FL_VALIDATE_IPA_PATH",
54
+ description: "IPA Path",
55
+ is_string: true,
56
+ verify_block: proc do |value|
57
+ UI.user_error!("Path is not valid.") unless (value and not value.empty?)
58
+ end),
59
+ FastlaneCore::ConfigItem.new(
60
+ key: :platform,
61
+ env_name: "FL_VALIDATE_IPA_PLATFORM",
62
+ description: "IPA Platform",
63
+ is_string: true,
64
+ verify_block: proc do |value|
65
+ UI.user_error!("Platform is not valid.") unless (value and not value.empty?)
66
+ platform = %w(ios macos)
67
+ UI.user_error!("Unsupported platform. (Supported platforms : #{platform})") unless platform.include?(value)
68
+ end),
69
+ FastlaneCore::ConfigItem.new(
70
+ key: :username,
71
+ env_name: "FL_VALIDATE_IPA_USERNAME",
72
+ description: "Apple ID",
73
+ is_string: true,
74
+ verify_block: proc do |value|
75
+ UI.user_error!("Apple ID is not valid.") unless (value and not value.empty?)
76
+ end),
77
+ FastlaneCore::ConfigItem.new(
78
+ key: :password,
79
+ env_name: "FL_VALIDATE_IPA_PASSWORD",
80
+ description: "Apple ID or App-specific password",
81
+ is_string: true,
82
+ verify_block: proc do |value|
83
+ UI.user_error!("Apple ID or App-specific password is not valid.") unless (value and not value.empty?)
84
+ end)
81
85
  ]
82
86
  end
83
87
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module ValidateIpa
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-validate_ipa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hacoma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-18 00:00:00.000000000 Z
11
+ date: 2022-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
183
  requirements: []
184
- rubygems_version: 3.2.29
184
+ rubygems_version: 3.3.7
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: Validate the IPA using altool.