cocoapods-byte-panglem-beta 0.0.8 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-byte-panglem-beta/analyzer.rb +9 -1
- data/lib/cocoapods-byte-panglem-beta/gem_version.rb +1 -1
- data/lib/cocoapods-byte-panglem-beta/net.rb +1 -1
- data/lib/cocoapods-byte-panglem-beta/panglem.rb +1 -8
- data/lib/cocoapods-byte-panglem-beta/recorder.rb +36 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa81c7bd0a3ada3a0075b349f5bdd6f6fde65b933e9c9b123917a888fb17b662
|
4
|
+
data.tar.gz: b68e551621d6c6ba9080671407d71f90dee8506e76398da8172a5e57c7c637bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2419ed742643c78f7582027d3a02cf38aec02a45e075e92d7378af82e0540b255a8b109b0caa41042cbcb656ba6331c875d31930425730c8fd60a57c16117de4
|
7
|
+
data.tar.gz: 4b28dff231bea673fd78595a3df507bf51de33319c945883feaec5a11059647736f75444fd31fb465de87b10ead63b286e620045239c0cb8cca7223d66f8f096
|
@@ -117,6 +117,7 @@ module PM
|
|
117
117
|
result = PM::SpecificationInfo.get_specfication response_data, sdk_spec
|
118
118
|
## 1. 判断sdk是否要更新, YES 则将旧的全部删除, 新的全部挂载
|
119
119
|
## 2. 判断rely 是否要更新, YES 则同上
|
120
|
+
|
120
121
|
if result.is_sdk_update
|
121
122
|
## 这里截断,询问是否更新
|
122
123
|
# cli = HighLine.new
|
@@ -133,6 +134,7 @@ module PM
|
|
133
134
|
}
|
134
135
|
|
135
136
|
if result.is_rely_update
|
137
|
+
|
136
138
|
specs.delete_if{|spec|
|
137
139
|
Pod::Specification.root_name(spec.spec.name) == result.rely_name && spec.spec.version.version == result.rely_original_version
|
138
140
|
}
|
@@ -140,6 +142,12 @@ module PM
|
|
140
142
|
specs << Pod::Resolver::ResolverSpecification.new(spec, false, spec.spec_source)
|
141
143
|
}
|
142
144
|
end
|
145
|
+
if result.is_rely_remove
|
146
|
+
specs.delete_if{|spec|
|
147
|
+
|
148
|
+
Pod::Specification.root_name(spec.spec.name) == result.rely_name
|
149
|
+
}
|
150
|
+
end
|
143
151
|
specs.sort_by!{|spec| spec.spec.name}
|
144
152
|
is_update_finish = true
|
145
153
|
request_track result.sdk_original_version, result.sdk_target_version, result.sdk_target_version, response_data["code"], response_data["message"]
|
@@ -198,7 +206,7 @@ module PM
|
|
198
206
|
|
199
207
|
message = Hash["ts"=>Time.now.to_i,"stats_list"=>stats_list].to_json
|
200
208
|
body = Hash["message"=>message,"cypher"=>0]
|
201
|
-
PM::Network.request_track(body,old_ad_sdk_version)
|
209
|
+
# PM::Network.request_track(body,old_ad_sdk_version)
|
202
210
|
end
|
203
211
|
|
204
212
|
def self.is_update?(value)
|
@@ -37,7 +37,7 @@ module PM
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def Network.request_adapter(body, is_debug = false)
|
40
|
-
if
|
40
|
+
if false
|
41
41
|
url = URI.parse('http://localhost:8080/index.html')
|
42
42
|
http = Net::HTTP.new(url.host, url.port)
|
43
43
|
request = Net::HTTP::Get.new(url.path, initheader = {'Content-Type' =>'application/json'})
|
@@ -78,7 +78,7 @@ class Pod::Installer::Analyzer
|
|
78
78
|
specs.each do |s|
|
79
79
|
s.dependencies(platform).each do |dep|
|
80
80
|
temp_name = dep.name
|
81
|
-
if !temp_name.include?("Ads-Global
|
81
|
+
if !temp_name.include?("Ads-Global")
|
82
82
|
all_specs[dep.name].each do |spec|
|
83
83
|
if spec.non_library_specification?
|
84
84
|
if s.test_specification? && spec.name == s.consumer(platform).app_host_name && spec.app_specification?
|
@@ -108,10 +108,6 @@ class Pod::Installer::Analyzer
|
|
108
108
|
resolver_specs_by_target.each do |target, specs|
|
109
109
|
|
110
110
|
if specs.length > 0
|
111
|
-
## SDK 场景下 不需要
|
112
|
-
# Pod::UserInterface.section 'cocoapods-byte-panglem remove invalid dependencie from loaded dependencies ' do
|
113
|
-
# PM::Analyzer.delete_invalid_adapters target, specs
|
114
|
-
# end if PM::Recorder.instance.get_global_note.auto_load
|
115
111
|
|
116
112
|
if PM::Recorder.instance.is_release
|
117
113
|
Pod::UserInterface.section "[cocoapods-byte-panglem-beta][info] start trying to update the sdk version (when is_release is yes) " do
|
@@ -159,9 +155,6 @@ module Pod
|
|
159
155
|
when Hash
|
160
156
|
PM::Recorder.instance.set_is_debug options[:is_debug] if options.has_key?(:is_debug)
|
161
157
|
PM::Recorder.instance.set_is_auto_update options[:is_auto_update]if options.has_key?(:is_auto_update)
|
162
|
-
m = PM::Recorder.instance.is_debug
|
163
|
-
n = PM::Recorder.instance.is_auto_update
|
164
|
-
c = 1
|
165
158
|
end
|
166
159
|
|
167
160
|
PMPlugin.update
|
@@ -5,6 +5,8 @@ require 'cocoapods'
|
|
5
5
|
require_relative 'net'
|
6
6
|
require_relative 'config'
|
7
7
|
require_relative 'tool'
|
8
|
+
require 'rubygems/version'
|
9
|
+
|
8
10
|
|
9
11
|
|
10
12
|
|
@@ -195,6 +197,7 @@ module PM
|
|
195
197
|
class UpdateResut
|
196
198
|
attr_accessor :is_sdk_update
|
197
199
|
attr_accessor :is_rely_update
|
200
|
+
attr_accessor :is_rely_remove
|
198
201
|
attr_accessor :sdk_list
|
199
202
|
attr_accessor :rely_list
|
200
203
|
attr_accessor :sdk_name
|
@@ -432,10 +435,12 @@ module PM
|
|
432
435
|
## 3. 计算出升级时需要替换的所有的specfication
|
433
436
|
info_r = get_info
|
434
437
|
target_sdk_version = response_data["data"]["pangle_sdk_version"]
|
438
|
+
original_sdk_version = original_sdk_spec.spec.version.version
|
439
|
+
|
435
440
|
# target_sdk_version = "5.9.0.4"
|
436
441
|
sdk_name = PM::BuildConfig.pangle_sdk_beta
|
437
442
|
if target_sdk_version == nil || target_sdk_version.length == 0
|
438
|
-
##
|
443
|
+
## 赋值为当前版本且为正式版
|
439
444
|
target_sdk_version = original_sdk_spec.spec.version.version
|
440
445
|
sdk_name = PM::BuildConfig.pangle_sdk_release
|
441
446
|
else
|
@@ -461,20 +466,42 @@ module PM
|
|
461
466
|
result.sdk_target_version = target_sdk_root_spec.version.version
|
462
467
|
PM::Recorder.instance.sdk_original_version = result.sdk_original_version
|
463
468
|
PM::Recorder.instance.sdk_target_version = result.sdk_target_version
|
464
|
-
target_rely_version =
|
465
|
-
original_rely_version =
|
469
|
+
target_rely_version = "0.0.0.0"
|
470
|
+
original_rely_version = "0.0.0.0"
|
471
|
+
if Gem::Version.new(target_sdk_version) < Gem::Version.new("6.3.0.0")
|
472
|
+
target_rely_version = target_sdk_root_spec.get_rely_version
|
473
|
+
end
|
474
|
+
if Gem::Version.new(original_sdk_version) < Gem::Version.new("6.3.0.0")
|
475
|
+
original_rely_version = original_sdk_spec.spec.get_rely_version
|
476
|
+
end
|
477
|
+
|
478
|
+
|
466
479
|
# target_rely_version = "0.2.0.0"
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
result.
|
472
|
-
result.rely_list = target_rely_spec_list
|
480
|
+
## 判断灰度目标版本是否>=6300, 大于等于 则删除rely的依赖
|
481
|
+
if Gem::Version.new(target_sdk_version) >= Gem::Version.new("6.3.0.0")
|
482
|
+
result.is_rely_remove = true;
|
483
|
+
result.is_rely_update = false
|
484
|
+
result.rely_list = []
|
473
485
|
result.rely_original_version = original_rely_version
|
474
486
|
result.rely_target_version = target_rely_version
|
475
487
|
PM::Recorder.instance.rely_original_version = result.rely_original_version
|
476
488
|
PM::Recorder.instance.rely_target_version = result.rely_target_version
|
489
|
+
else
|
490
|
+
|
491
|
+
if target_rely_version != original_rely_version
|
492
|
+
target_rely_spec_list = info_r[rely_name].select do |spec|
|
493
|
+
Pod::Specification.root_name(spec.name) == rely_name && spec.version.version == target_rely_version
|
494
|
+
end
|
495
|
+
result.is_rely_remove = false;
|
496
|
+
result.is_rely_update = true
|
497
|
+
result.rely_list = target_rely_spec_list
|
498
|
+
result.rely_original_version = original_rely_version
|
499
|
+
result.rely_target_version = target_rely_version
|
500
|
+
PM::Recorder.instance.rely_original_version = result.rely_original_version
|
501
|
+
PM::Recorder.instance.rely_target_version = result.rely_target_version
|
502
|
+
end
|
477
503
|
end
|
504
|
+
|
478
505
|
end
|
479
506
|
result
|
480
507
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-byte-panglem-beta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zhangtianhao.1230@bytedance.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|