fastlane-plugin-analyze_ios_linkmap 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: c3bdbca21db75b21aaf970b4116c66ce3bfb4bfda14b606c1eddcc08748b2396
4
- data.tar.gz: 40fd82b671e199e38a1215be9a665e08a312440c502e83aacd30c654a3fba9e5
3
+ metadata.gz: 3bdae3bd06c7983bffed71d45c4949422392294444eecdf0cd2a2fdd875a26e6
4
+ data.tar.gz: d691d600d319c10bb942a0213bf346d652a277fb7856349ed776df4774e720b2
5
5
  SHA512:
6
- metadata.gz: 26ddfed8795e9b4416a4ea3fb03dc2eaa013c84ab2587537612b4b0b0edeb4b77685fc9edd361be4301edf345bb311d3448c7fd610a7d986982261cfc15270d3
7
- data.tar.gz: 27b1cb171f8990d3a4b5f8068f26b67d3203e3a9dbefc76abd1463c53fc00b5d693fc5ddfcbbd8d52d44c28d7119121093c2bf3087bc48733bf4e6a4d61a16c8
6
+ metadata.gz: b2698972c4ef947b4507c0e5de7880cf686312d105f43d1965df8f971865047aeed1c57534d9e1aa49b5e29b08818373b809b3e7a3a6447c6e591af94736f8e7
7
+ data.tar.gz: f4fe912c68549b0e6f4db3c80e0d743d5e172595d8c428b14ee09af19ddbc872690602f4c656d4374f1268080434e0e15a0d5e3848fa700d9bbb9a5baad0437c
@@ -19,6 +19,12 @@ module Fastlane
19
19
  all_symbols = params[:all_symbols] || false
20
20
  merge_by_pod = params[:merge_by_pod] || false
21
21
 
22
+ UI.important("❗️[analyze_ios_linkmap_action:run] file_path: #{file_path}")
23
+ UI.important("❗️[analyze_ios_linkmap_action:run] search_symbol: #{search_symbol}")
24
+ UI.important("❗️[analyze_ios_linkmap_action:run] all_objects: #{all_objects}")
25
+ UI.important("❗️[analyze_ios_linkmap_action:run] all_symbols: #{all_symbols}")
26
+ UI.important("❗️[analyze_ios_linkmap_action:run] merge_by_pod: #{merge_by_pod}")
27
+
22
28
  linkmap_parser = Fastlane::Helper::LinkMap::Parser.new(
23
29
  if search_symbol
24
30
  {
@@ -36,19 +42,19 @@ module Fastlane
36
42
  )
37
43
 
38
44
  # parse Linkmap.txt
39
- Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_PARSED_HASH] = linkmap_parser.pretty_hash
40
- Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_PARSED_JSON] = linkmap_parser.pretty_json
45
+ Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_PARSED_HASH] = linkmap_parser.generate_hash
46
+ Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_PARSED_JSON] = linkmap_parser.generate_json
41
47
 
42
48
  # merge Linkmap.txt parsed all symbols by library
43
49
  if merge_by_pod
44
- Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_PARSED_MERGE_HASH] = linkmap_parser.pretty_merge_by_pod_hash
45
- Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_PARSED_MERGE_JSON] = linkmap_parser.pretty_merge_by_pod_json
50
+ Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_PARSED_MERGE_HASH] = linkmap_parser.generate_merge_by_pod_hash
51
+ Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_PARSED_MERGE_JSON] = linkmap_parser.generate_merge_by_pod_json
46
52
  end
47
53
 
48
54
  # if search a symbol from Linkmap.txt
49
55
  if search_symbol
50
56
  Fastlane::Actions.lane_context[Fastlane::Actions::ShatedValues::ANALYZE_IOS_LINKMAP_SEARCH_SYMBOL] = []
51
- linkmap_parser.pretty_hash[:librarys].each do |lib|
57
+ linkmap_parser.generate_hash[:librarys].each do |lib|
52
58
  lib[:object_files].each do |obj|
53
59
  obj[:symbols].each do |symol|
54
60
  next unless symol[:name].include?(search_symbol)
@@ -176,14 +176,14 @@ module Fastlane
176
176
  library.dead_symbol_size += stripped_symbol.size
177
177
  end
178
178
 
179
- def pretty_json
179
+ def generate_json
180
180
  return @json_result if @json_result
181
181
 
182
- @json_result = JSON.pretty_generate(pretty_hash)
182
+ @json_result = JSON.generate(generate_hash)
183
183
  @json_result
184
184
  end
185
185
 
186
- def pretty_hash
186
+ def generate_hash
187
187
  return @hash_result if @hash_result
188
188
 
189
189
  # sort object_map[i].ObjectFile.symbols
@@ -228,7 +228,7 @@ module Fastlane
228
228
  @hash_result = {
229
229
  count: fixed_librarys.count,
230
230
  size: total_size,
231
- format_total_size: Fastlane::Helper::LinkMap::FileHelper.format_size(total_size),
231
+ format_size: Fastlane::Helper::LinkMap::FileHelper.format_size(total_size),
232
232
  dead_size: total_dead_size,
233
233
  format_dead_size: Fastlane::Helper::LinkMap::FileHelper.format_size(total_dead_size),
234
234
  librarys: fixed_librarys
@@ -236,21 +236,21 @@ module Fastlane
236
236
  @hash_result
237
237
  end
238
238
 
239
- def pretty_merge_by_pod_json
239
+ def generate_merge_by_pod_json
240
240
  return @merge_json_result if @merge_json_result
241
- @merge_json_result = JSON.pretty_generate(pretty_merge_by_pod_hash)
241
+ @merge_json_result = JSON.generate(generate_merge_by_pod_hash)
242
242
  @merge_json_result
243
243
  end
244
244
 
245
- def pretty_merge_by_pod_hash
245
+ def generate_merge_by_pod_hash
246
246
  return @merge_hash_result if @merge_hash_result
247
247
 
248
248
  @merge_hash_result = {
249
- count: pretty_hash[:count],
250
- size: pretty_hash[:size],
251
- format_size: pretty_hash[:format_size],
252
- dead_size: pretty_hash[:dead_size],
253
- format_dead_size: pretty_hash[:format_dead_size]
249
+ count: generate_hash[:count],
250
+ size: generate_hash[:size],
251
+ format_size: generate_hash[:format_size],
252
+ dead_size: generate_hash[:dead_size],
253
+ format_dead_size: generate_hash[:format_dead_size]
254
254
  }
255
255
 
256
256
  # 合并 subspec 下的 library
@@ -283,7 +283,7 @@ module Fastlane
283
283
  # └── SecurityGuardSDK.framework
284
284
  #
285
285
  pod_hash = Hash.new
286
- pretty_hash[:librarys].each_with_object(pod_hash) do |lib, hash|
286
+ generate_hash[:librarys].each_with_object(pod_hash) do |lib, hash|
287
287
  apod_librarys = hash[lib[:podspec_name]]
288
288
  apod_librarys ||= Array.new
289
289
  apod_librarys << lib
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AnalyzeIosLinkmap
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
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_linkmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-13 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: pry
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  requirements: []
178
- rubygems_version: 3.0.6
178
+ rubygems_version: 3.0.4
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: iOS parse linkmap.txt to ruby Hash