fastlane-plugin-analyze_ios_ipa 0.1.1 → 0.1.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
2
  SHA256:
3
- metadata.gz: a22de7074e0b3e81c7d8d2b55066f909ce9abc6ae1db6f245ba9f7bfe192c408
4
- data.tar.gz: 0dd4466b6a962995b36edb0bc0901095a42f09c90b082ee4b905befe1d3545e9
3
+ metadata.gz: 9ab71831d61eb20824e21884ee7a3d4eb420282faf81eb6228f17a6546da9a3e
4
+ data.tar.gz: d972b5ba037f6f0b2377b5c8b320195f909abdb37bd8d836dbd2063fdbc5ccb4
5
5
  SHA512:
6
- metadata.gz: 24df37171be29948faac5d0fe1d3392d854aede2132b18c8e85d87b6483db4211f0b6d2561633e8c156d810b6bed4576271ce32e7b3122957586442d8533069b
7
- data.tar.gz: d3ea89fa790d33cd6a05c4a64f04083c8f39b463bbf39f8b6f698247cd86b39cc7ad0e5a249ac5ad0fbafce97eb7c742a12f063d7f0c700a52e9f8c1494a5c8a
6
+ metadata.gz: fe6788a2f616954d2c7bd235cdb08e7a58f96659d25ca29e480c07c70fbfd6f13139f884c5a756d1696861eabdf110366e21c0d4821dc26f614d791cdcb63f4a
7
+ data.tar.gz: 1a55dd4c5c97c9da1bc8a978135e246ea701165cc9006b0dc135e647eac029fa64ea87aed85449d4a123e701bd8971e259242a22d4a7728ba171b32876fdf249
@@ -15,16 +15,28 @@ module Fastlane
15
15
  class AnalyzeIosIpaAction < Action
16
16
  def self.run(params)
17
17
  ipa_path = params[:ipa_path]
18
- app_name = params[:app_name]
19
18
  app_path = params[:app_path]
19
+ app_name = params[:app_name]
20
20
  group = params[:group] || true
21
-
22
21
  valid_params(ipa_path, app_path)
23
- analyze_ipa(group) if ipa_path
24
- analyze_app(group) if app_path
22
+
23
+ UI.important("❗️[analyze_ios_ipa_action:run] ipa: #{ipa_path}")
24
+ UI.important("❗️[analyze_ios_ipa_action:run] app: #{app_path}")
25
+ UI.important("❗️[analyze_ios_ipa_action:run] app.name: #{app_name}")
26
+ UI.important("❗️[analyze_ios_ipa_action:run] group: #{group}")
27
+
28
+ ret = if ipa_path
29
+ analyze_ipa(group)
30
+ elsif app_path
31
+ analyze_app(group)
32
+ else
33
+ false
34
+ end
35
+ return false unless ret
25
36
 
26
37
  Actions.lane_context[Actions::SharedValues::AnalyzeIosIpaActionResultHash] = generate_hash
27
38
  Actions.lane_context[Actions::SharedValues::AnalyzeIosIpaActionResultJSON] = generate_json
39
+ true
28
40
  end
29
41
 
30
42
  def self.valid_params(ipa_path, app_path)
@@ -44,7 +56,7 @@ module Fastlane
44
56
 
45
57
  def self.analyze_ipa(group)
46
58
  ipa_path = Fastlane::Helper::Config.instance.ipa_path
47
- UI.important "❗️[analyze_ipa] ipa_path: #{ipa_path}"
59
+ UI.important "❗️[analyze_ios_ipa_action:analyze_ipa] ipa_path: #{ipa_path}"
48
60
 
49
61
  return false unless ipa_path
50
62
  return false if ipa_path.empty?
@@ -75,11 +87,12 @@ module Fastlane
75
87
 
76
88
  # 解析 xx.app
77
89
  analyze_app(group)
90
+ true
78
91
  end
79
92
 
80
93
  def self.analyze_app(group)
81
94
  app_path = Fastlane::Helper::Config.instance.app_path
82
- UI.important "❗️[analyze_app] app_path: #{app_path}"
95
+ UI.important "❗️[analyze_ios_ipa_action:analyze_app] app_path: #{app_path}"
83
96
 
84
97
  return false unless app_path
85
98
  return false if app_path.empty?
@@ -88,6 +101,7 @@ module Fastlane
88
101
  # 解析 xx.app
89
102
  app = Fastlane::Helper::App.new(app_path, group: group)
90
103
  Fastlane::Helper::Config.instance.app = app
104
+ true
91
105
  end
92
106
 
93
107
  def self.generate_json
@@ -96,9 +110,9 @@ module Fastlane
96
110
 
97
111
  def self.generate_hash
98
112
  {
99
- ipa: Fastlane::Helper::Config.instance.ipa.generate_hash,
100
- app: Fastlane::Helper::Config.instance.app.generate_hash
101
- }
113
+ ipa: (Fastlane::Helper::Config.instance.ipa.generate_hash if Fastlane::Helper::Config.instance.ipa),
114
+ app: (Fastlane::Helper::Config.instance.app.generate_hash if Fastlane::Helper::Config.instance.app)
115
+ }.compact
102
116
  end
103
117
 
104
118
  def self.description
@@ -135,7 +149,7 @@ module Fastlane
135
149
  ),
136
150
  FastlaneCore::ConfigItem.new(
137
151
  key: :app_name,
138
- description: 'app file path',
152
+ description: 'app executable file name',
139
153
  type: String,
140
154
  optional: true
141
155
  ),
@@ -8,7 +8,7 @@ module Fastlane
8
8
  require_relative 'file_category'
9
9
 
10
10
  class App
11
- ATTRS = [:group, :size, :formar_size, :info, :executable]
11
+ ATTRS = [:group, :size, :format_size, :info, :executable]
12
12
  attr_accessor(*ATTRS)
13
13
  alias group? group
14
14
 
@@ -18,7 +18,7 @@ module Fastlane
18
18
  def to_hash
19
19
  h = {
20
20
  size: @size,
21
- formar_size: @formar_size,
21
+ format_size: @format_size,
22
22
  info: {
23
23
  executable: @info.executable,
24
24
  device_capabilities: @info.device_capabilities,
@@ -49,7 +49,7 @@ module Fastlane
49
49
 
50
50
  # size
51
51
  @size = FileHelper.file_size(app_path)
52
- @formar_size = FileHelper.format_size(@size)
52
+ @format_size = FileHelper.format_size(@size)
53
53
 
54
54
  # info.plist
55
55
  info_plist_path = File.expand_path(INFO_PLIST, app_path)
@@ -9,7 +9,7 @@ module Fastlane
9
9
  # 文件类型
10
10
  #
11
11
  class FileCategory
12
- attr_accessor :name, :file_infos, :size, :formar_size
12
+ attr_accessor :name, :file_infos, :size, :format_size
13
13
 
14
14
  PLUGINS = 'PlugIns'
15
15
  FRAMEWORKS = 'Frameworks'
@@ -21,7 +21,7 @@ module Fastlane
21
21
  {
22
22
  name: @name,
23
23
  size: @size,
24
- formar_size: @formar_size,
24
+ format_size: @format_size,
25
25
  files: @file_infos.map(&:to_hash)
26
26
  }
27
27
  end
@@ -110,7 +110,7 @@ module Fastlane
110
110
 
111
111
  def finish
112
112
  @size = @file_infos.map(&:size).inject(0, :+)
113
- @formar_size = FileHelper.format_size(@size)
113
+ @format_size = FileHelper.format_size(@size)
114
114
  end
115
115
  end
116
116
  end
@@ -12,13 +12,13 @@ module Fastlane
12
12
  FileInfoUnknownDir = :FileInfoUnknownDir
13
13
  FileInfoUnknown = :FileInfoUnknown
14
14
 
15
- attr_accessor :name, :path, :size, :formar_size, :type
15
+ attr_accessor :name, :path, :size, :format_size, :type
16
16
 
17
17
  def to_hash
18
18
  {
19
19
  name: @name,
20
20
  size: @size,
21
- formar_size: @formar_size,
21
+ format_size: @format_size,
22
22
  path: @path,
23
23
  type: @type
24
24
  }
@@ -28,7 +28,7 @@ module Fastlane
28
28
  @name = File.basename(file_path)
29
29
  @path = file_path
30
30
  @size = FileHelper.file_size(file_path)
31
- @formar_size = FileHelper.format_size(@size)
31
+ @format_size = FileHelper.format_size(@size)
32
32
 
33
33
  names = @name.split('.')
34
34
  @type = if names.count > 1
@@ -3,7 +3,7 @@ module Fastlane
3
3
  UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
4
4
  module Helper
5
5
  class Ipa
6
- ATTRS = [:size, :formar_size]
6
+ ATTRS = [:size, :format_size]
7
7
  attr_accessor(*ATTRS)
8
8
 
9
9
  def initialize(ipa_path)
@@ -13,13 +13,13 @@ module Fastlane
13
13
 
14
14
  # size
15
15
  @size = FileHelper.file_size(ipa_path)
16
- @formar_size = FileHelper.format_size(@size)
16
+ @format_size = FileHelper.format_size(@size)
17
17
  end
18
18
 
19
19
  def to_hash
20
20
  {
21
21
  size: @size,
22
- formar_size: @formar_size
22
+ format_size: @format_size
23
23
  }
24
24
  end
25
25
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AnalyzeIosIpa
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-analyze_ios_ipa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - xiongzenghui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-18 00:00:00.000000000 Z
11
+ date: 2020-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList
@@ -104,16 +104,16 @@ dependencies:
104
104
  name: rubocop
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: 0.49.1
109
+ version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: 0.49.1
116
+ version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: rubocop-require_tools
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
- version: 2.128.1
151
+ version: '0'
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
- version: 2.128.1
158
+ version: '0'
159
159
  description:
160
160
  email: zxcvb1234001@163.com
161
161
  executables: []
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.0.6
196
+ rubygems_version: 3.0.4
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: 'analysis iOS app/ipa multiple data. eg: 1) ipa basic info 2) Size occupied