cocoapods-bb-bin 0.2.8.1 → 0.2.9.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cc0ab50509e17f48d29a81ccf19a46f2dc332b4efc0d035a13023106366424f
|
4
|
+
data.tar.gz: d7211405407238227f83864a8c24148889730bcf226e00f50dfa7526d9204e26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71bb50eca6908d30e199bbe4a4c65e1c86db0b9e3e470417626f8d6a56a192567f05687051ef79137a058f38e4398d9fbe53efb2ecb88dce4aa6ab2130573685
|
7
|
+
data.tar.gz: ed760852033d74d21498c5c671ef66136e890bdd53976b93bb32eb02f058d0e345ea754b59c46be14ce43493c6fb6ddbe3812cd0c20a919c15b12c895887524b
|
@@ -19,9 +19,11 @@ module Pod
|
|
19
19
|
[
|
20
20
|
['--sources', '私有源地址,多个用分号区分'],
|
21
21
|
['--path', '(必传)需要上传文件路径'],
|
22
|
+
['--new_pod_name', '(可选)组件库新名称'],
|
22
23
|
['--vendored_framework_name', '(可选)组件库依赖framework名称,默认组件名称'],
|
23
24
|
['--dylib', '(可选)是否动态库,默认静态库'],
|
24
25
|
['--developer_mode', '(可选)是否开发者模式,默认发布模式'],
|
26
|
+
['--upload_res', '(可选)是否上传资源文件,格式:zip、tgz'],
|
25
27
|
].concat(Pod::Command::Gen.options).concat(super).uniq
|
26
28
|
end
|
27
29
|
|
@@ -35,9 +37,12 @@ module Pod
|
|
35
37
|
@podspec = argv.shift_argument || find_podspec
|
36
38
|
@sources = argv.option('sources') || []
|
37
39
|
@localPath = argv.option('path') || nil
|
40
|
+
@pod_name = argv.option('new_pod_name') || nil
|
38
41
|
@vendored_framework_name = argv.option('vendored_framework_name') || nil
|
39
42
|
@is_dylib = argv.flag?('dylib', false )
|
40
43
|
@is_dev_model = argv.flag?('developer_mode', false )
|
44
|
+
# 上传资源
|
45
|
+
@is_up_res = argv.flag?('upload_res', false )
|
41
46
|
end
|
42
47
|
super
|
43
48
|
end
|
@@ -57,6 +62,11 @@ module Pod
|
|
57
62
|
@spec = Specification.from_file(@podspec)
|
58
63
|
# dev环境修改version规则 by hm 24/8/20
|
59
64
|
@spec.version = binary_version(@is_dev_model)
|
65
|
+
# 修改pod名称 by hm 24/10/9
|
66
|
+
if @pod_name
|
67
|
+
puts "====修改pod名称,原始:#{@spec.name} 新:#{@pod_name}"
|
68
|
+
@spec.name = @pod_name
|
69
|
+
end
|
60
70
|
# 上传文件
|
61
71
|
localPath = update_uploadpath unless !@localPath
|
62
72
|
if File.file?(localPath)
|
@@ -67,7 +77,7 @@ module Pod
|
|
67
77
|
fail_push_specs = []
|
68
78
|
sources_sepc.uniq.each do |spec|
|
69
79
|
begin
|
70
|
-
fail_push_specs << spec unless CBin::Upload::Helper.new(spec,true,@sources,true).upload_binary_file(localPath, @is_dylib, @vendored_framework_name)
|
80
|
+
fail_push_specs << spec unless CBin::Upload::Helper.new(spec,true,@sources,true).upload_binary_file(localPath, @is_dylib, @vendored_framework_name, @is_up_res)
|
71
81
|
rescue Object => exception
|
72
82
|
UI.puts exception
|
73
83
|
fail_push_specs << spec
|
@@ -19,10 +19,14 @@ module CBin
|
|
19
19
|
raise Pod::Informative, '源码 podspec 不能为空 .' unless code_spec
|
20
20
|
end
|
21
21
|
|
22
|
-
def create(frameworkName=nil, is_xcframework=false)
|
22
|
+
def create(frameworkName=nil, is_xcframework=false, isUpRes=false)
|
23
23
|
# spec = nil
|
24
24
|
if CBin::Build::Utils.is_framework(@code_spec)
|
25
|
-
|
25
|
+
if isUpRes
|
26
|
+
Pod::UI::puts "make res spec. vendored_framework_name:#{frameworkName}"
|
27
|
+
else
|
28
|
+
Pod::UI::puts "make framework spec. vendored_framework_name:#{frameworkName} is_xcframework:#{is_xcframework}"
|
29
|
+
end
|
26
30
|
if !frameworkName # 如果外部没有传入fk名称默认组件名称
|
27
31
|
frameworkName = code_spec.root.name
|
28
32
|
end
|
@@ -31,7 +35,6 @@ module CBin
|
|
31
35
|
Pod::UI::puts "make source code spec. vendored_framework_name:#{frameworkName}"
|
32
36
|
spec = create_from_code_spec
|
33
37
|
end
|
34
|
-
|
35
38
|
spec
|
36
39
|
end
|
37
40
|
|
@@ -22,14 +22,26 @@ module CBin
|
|
22
22
|
@pushsourcespec = pushsourcespec # 推送源码
|
23
23
|
end
|
24
24
|
|
25
|
-
def upload(isGenDylib=false)
|
25
|
+
def upload(isGenDylib=false, isUpRes=false)
|
26
26
|
Dir.chdir(CBin::Config::Builder.instance.root_dir) do
|
27
|
-
|
27
|
+
zip_file=nil
|
28
|
+
if isUpRes
|
29
|
+
zip_file = own_res_binary_file(restype)
|
30
|
+
else
|
31
|
+
zip_file = own_source_binary_file
|
32
|
+
end
|
33
|
+
return upload_binary_file(zip_file, isGenDylib, @spec.name, isUpRes)
|
28
34
|
end
|
29
35
|
end
|
30
36
|
|
31
|
-
def upload_binary_file(zip_file, isGenDylib=false, vendored_framework_name=nil)
|
37
|
+
def upload_binary_file(zip_file, isGenDylib=false, vendored_framework_name=nil, isUpRes=false)
|
32
38
|
Dir.chdir(CBin::Config::Builder.instance.root_dir) do
|
39
|
+
res_type = "zip"
|
40
|
+
extension = File.extname(zip_file)
|
41
|
+
if extension == '.gz' || extension == '.tgz'
|
42
|
+
res_type = "tgz"
|
43
|
+
end
|
44
|
+
puts "res extension:#{res_type} isUpRes:#{isUpRes}".red
|
33
45
|
# 创建binary-template.podsepc
|
34
46
|
# 上传二进制文件
|
35
47
|
# 上传二进制 podspec
|
@@ -38,18 +50,22 @@ module CBin
|
|
38
50
|
puts "上传二进制文件完成 状态:#{isupload}".green
|
39
51
|
if isupload
|
40
52
|
is_xcframework = false
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
53
|
+
if isUpRes
|
54
|
+
is_xcframework = false
|
55
|
+
else
|
56
|
+
[
|
57
|
+
"xcframework.zip", # 三方库
|
58
|
+
"xcframework_#{@spec.version}.zip", # 自有库
|
59
|
+
].each do |name|
|
60
|
+
is_xcframework = zip_file.include?(name)
|
61
|
+
if is_xcframework == true
|
62
|
+
break
|
63
|
+
end
|
48
64
|
end
|
49
65
|
end
|
50
66
|
# is_xcframework = zip_file.include?('xcframework.zip')
|
51
|
-
filename = spec_creator(vendored_framework_name, is_xcframework)
|
52
|
-
Pod::UI.puts "上传二进制 podspec: #{filename} zip:#{zip_file} 是否动态库: #{isGenDylib} vendored_framework_name:#{vendored_framework_name} is_xcframework:#{is_xcframework}"
|
67
|
+
filename = spec_creator(vendored_framework_name, is_xcframework, isUpRes)
|
68
|
+
Pod::UI.puts "上传二进制 podspec: #{filename} zip:#{zip_file} 是否动态库: #{isGenDylib} vendored_framework_name:#{vendored_framework_name} is_xcframework:#{is_xcframework} isUpRes:#{isUpRes}"
|
53
69
|
push_helper = CBin::Push::Helper.new()
|
54
70
|
push_helper.push_binary_repo(filename,isGenDylib)
|
55
71
|
# 上传源码 podspec
|
@@ -63,10 +79,10 @@ module CBin
|
|
63
79
|
end
|
64
80
|
|
65
81
|
private
|
66
|
-
def spec_creator(vendored_framework_name=nil, is_xcframework=false)
|
82
|
+
def spec_creator(vendored_framework_name=nil, is_xcframework=false, isUpRes=false)
|
67
83
|
spec_creator = CBin::SpecificationSource::Creator.new(@spec)
|
68
84
|
@spec_creator = spec_creator
|
69
|
-
spec_creator.create(vendored_framework_name, is_xcframework)
|
85
|
+
spec_creator.create(vendored_framework_name, is_xcframework, isUpRes)
|
70
86
|
spec_creator.write_spec_file
|
71
87
|
spec_creator.filename
|
72
88
|
end
|
@@ -92,6 +108,16 @@ module CBin
|
|
92
108
|
end
|
93
109
|
return nil
|
94
110
|
end
|
111
|
+
#推送资源二进制文件
|
112
|
+
def own_res_binary_file(type="zip")
|
113
|
+
zip_file = "#{CBin::Config::Builder.instance.library_file(@spec)}.#{type}"
|
114
|
+
res = File.exist?(zip_file)
|
115
|
+
Pod::UI.puts "上传res path: #{res}"
|
116
|
+
if res
|
117
|
+
return zip_file
|
118
|
+
end
|
119
|
+
return nil
|
120
|
+
end
|
95
121
|
|
96
122
|
# 上传二进制文件
|
97
123
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-bb-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- humin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
220
|
- !ruby/object:Gem::Version
|
221
221
|
version: '0'
|
222
222
|
requirements: []
|
223
|
-
rubygems_version: 3.5.
|
223
|
+
rubygems_version: 3.5.20
|
224
224
|
signing_key:
|
225
225
|
specification_version: 4
|
226
226
|
summary: cocoapods-bb-bin is a plugin which helps develpers switching pods between
|