cocoapods-bb-bin 0.2.9.0 → 0.2.10.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 +4 -4
- data/lib/cocoapods-bb-bin/command/bin/localPush.rb +25 -2
- data/lib/cocoapods-bb-bin/command/bin/repo/push.rb +11 -10
- data/lib/cocoapods-bb-bin/command/bin/repo/update.rb +2 -1
- data/lib/cocoapods-bb-bin/config/config.rb +5 -0
- data/lib/cocoapods-bb-bin/gem_version.rb +1 -1
- data/lib/cocoapods-bb-bin/helpers/push_spec_helper.rb +30 -25
- data/lib/cocoapods-bb-bin/helpers/sources_helper.rb +24 -0
- data/lib/cocoapods-bb-bin/helpers/upload_helper.rb +2 -1
- data/lib/cocoapods-bb-bin/native/sources_manager.rb +25 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adaeaf327c8e0a9cf4a3bb44a19251e339a3ca1ab0ef66150dbc89668ee979ca
|
4
|
+
data.tar.gz: cdd539303b089e4a4c2f0f7bdc1e33b926bd0119605036a117b5f1ed8c2e9ce6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8659db8e50d3093614ae7d66db9a42ae9766ecd030dce9c474daa30b3c4e5214d81f71642ae910c61412a1e6b9b628e1cdd2c33b4e4c6b18491a4f8550de3523
|
7
|
+
data.tar.gz: 551e4e6c6ac07b842c2938d0c6bc30cf5fbf93738c5f3c4fd0d7beb077929cb982e125017a6e3807142609ae6f74b9b05d3371e68aa162ca8c5b8dc682dc6176
|
@@ -24,6 +24,7 @@ module Pod
|
|
24
24
|
['--dylib', '(可选)是否动态库,默认静态库'],
|
25
25
|
['--developer_mode', '(可选)是否开发者模式,默认发布模式'],
|
26
26
|
['--upload_res', '(可选)是否上传资源文件,格式:zip、tgz'],
|
27
|
+
['--only_business_spec', '(可选)仅仅上传到业务线专属spec,需要配合sources一起使用'],
|
27
28
|
].concat(Pod::Command::Gen.options).concat(super).uniq
|
28
29
|
end
|
29
30
|
|
@@ -43,6 +44,8 @@ module Pod
|
|
43
44
|
@is_dev_model = argv.flag?('developer_mode', false )
|
44
45
|
# 上传资源
|
45
46
|
@is_up_res = argv.flag?('upload_res', false )
|
47
|
+
# 上传到业务线专属spec
|
48
|
+
@only_business_spec = argv.flag?('only_business_spec', false )
|
46
49
|
end
|
47
50
|
super
|
48
51
|
end
|
@@ -75,9 +78,11 @@ module Pod
|
|
75
78
|
sources_sepc << @spec
|
76
79
|
|
77
80
|
fail_push_specs = []
|
81
|
+
pushsourcespec = hasUploadSourceCodeSpec # 是否需要上传源码spec
|
78
82
|
sources_sepc.uniq.each do |spec|
|
79
83
|
begin
|
80
|
-
|
84
|
+
is_upload_sourcecode =
|
85
|
+
fail_push_specs << spec unless CBin::Upload::Helper.new(spec,true,@sources,pushsourcespec).upload_binary_file(localPath, @is_dylib, @vendored_framework_name, @is_up_res)
|
81
86
|
rescue Object => exception
|
82
87
|
UI.puts exception
|
83
88
|
fail_push_specs << spec
|
@@ -102,7 +107,14 @@ module Pod
|
|
102
107
|
end
|
103
108
|
#pod repo update
|
104
109
|
UI.section("\nUpdating Spec Repositories\n".yellow) do
|
105
|
-
|
110
|
+
if !@sources.empty?
|
111
|
+
argvs = [
|
112
|
+
@sources,
|
113
|
+
]
|
114
|
+
else
|
115
|
+
argvs = []
|
116
|
+
end
|
117
|
+
Pod::Command::Bin::Repo::Update.new(CLAide::ARGV.new(argvs)).run
|
106
118
|
end
|
107
119
|
end
|
108
120
|
end
|
@@ -151,6 +163,17 @@ module Pod
|
|
151
163
|
return new_version
|
152
164
|
end
|
153
165
|
|
166
|
+
# 是否需要上传源码spec
|
167
|
+
def hasUploadSourceCodeSpec()
|
168
|
+
# 如果配置业务线专属spec,那么不去设置源码spec
|
169
|
+
hasSource = true
|
170
|
+
if @only_business_spec == true && !@sources.empty?
|
171
|
+
puts "配置业务线专属spec:#{@sources}".yellow
|
172
|
+
hasSource = false
|
173
|
+
end
|
174
|
+
return hasSource
|
175
|
+
end
|
176
|
+
|
154
177
|
end
|
155
178
|
end
|
156
179
|
end
|
@@ -61,7 +61,7 @@ module Pod
|
|
61
61
|
Podfile.execute_with_allow_prerelease(@allow_prerelease) do
|
62
62
|
Podfile.execute_with_use_binaries(!@code_dependencies) do
|
63
63
|
argvs = [
|
64
|
-
|
64
|
+
push_repo,
|
65
65
|
"--sources=#{sources_option(@code_dependencies, @sources)}",
|
66
66
|
*@additional_args
|
67
67
|
]
|
@@ -74,7 +74,7 @@ module Pod
|
|
74
74
|
argvs << '--use-libraries'
|
75
75
|
end
|
76
76
|
end
|
77
|
-
|
77
|
+
puts "push argvs: #{argvs}".yellow
|
78
78
|
push = Pod::Command::Repo::Push.new(CLAide::ARGV.new(argvs))
|
79
79
|
push.validate!
|
80
80
|
push.run
|
@@ -98,15 +98,10 @@ module Pod
|
|
98
98
|
end
|
99
99
|
@podspec = podspecs.first
|
100
100
|
end
|
101
|
-
new_repo = repo # 内部判断区源码还是二进制
|
102
|
-
if !@repo.nil?
|
103
|
-
new_repo = @repo # 使用命令传入
|
104
|
-
end
|
105
101
|
argvs = [
|
106
|
-
|
102
|
+
push_repo,
|
107
103
|
@podspec,
|
108
104
|
"--sources=#{sources_option(@code_dependencies, @sources)}",
|
109
|
-
# '--verbose',
|
110
105
|
'--allow-warnings',
|
111
106
|
'--use-static-frameworks',
|
112
107
|
'--skip-import-validation',
|
@@ -162,9 +157,15 @@ module Pod
|
|
162
157
|
end
|
163
158
|
end
|
164
159
|
|
165
|
-
def
|
166
|
-
|
160
|
+
def push_repo
|
161
|
+
if !@repo.empty?
|
162
|
+
new_repo = @repo # 使用命令传入
|
163
|
+
else
|
164
|
+
new_repo = @binary ? binary_source.name : code_source.name # 内部判断区源码还是二进制
|
165
|
+
end
|
166
|
+
return new_repo
|
167
167
|
end
|
168
|
+
|
168
169
|
end
|
169
170
|
end
|
170
171
|
end
|
@@ -8,7 +8,7 @@ module Pod
|
|
8
8
|
self.summary = '更新私有源'
|
9
9
|
|
10
10
|
self.arguments = [
|
11
|
-
CLAide::Argument.new('NAME', false)
|
11
|
+
CLAide::Argument.new('NAME', false) # local spec name
|
12
12
|
]
|
13
13
|
|
14
14
|
def self.options
|
@@ -28,6 +28,7 @@ module Pod
|
|
28
28
|
if @name || @all
|
29
29
|
config.sources_manager.update(@name, show_output)
|
30
30
|
else
|
31
|
+
puts "repo update valid_sources:#{valid_sources}"
|
31
32
|
Parallel.each(valid_sources, in_threads: 4) do |source|
|
32
33
|
UI.puts "更新私有源仓库 #{source.to_s}".yellow
|
33
34
|
source.update(show_output)
|
@@ -13,6 +13,11 @@ module CBin
|
|
13
13
|
def template_hash
|
14
14
|
{
|
15
15
|
'configuration_env' => { description: '编译环境', default: 'dev', selection: %w[dev debug_iphoneos release_iphoneos] },
|
16
|
+
'br_repo_url' => { description: 'BR产品线-源码私有源(源/静态库) Git 地址', default: 'https://github.com/CocoaPods/Specs.git' },
|
17
|
+
'bw_repo_url' => { description: 'BW产品线-源码私有源(源/静态库) Git 地址', default: 'https://github.com/CocoaPods/Specs.git' },
|
18
|
+
'math_repo_url' => { description: '数学产品线-源码私有源(源/静态库) Git 地址', default: 'https://github.com/CocoaPods/Specs.git' },
|
19
|
+
'science_repo_url' => { description: '科学产品线-源码私有源(源/静态库) Git 地址', default: 'https://github.com/CocoaPods/Specs.git' },
|
20
|
+
'abc_repo_url' => { description: 'ABC产品线-源码私有源(源/静态库) Git 地址', default: 'https://github.com/CocoaPods/Specs.git' },
|
16
21
|
'code_repo_url' => { description: '源码私有源(源/静态库) Git 地址', default: 'https://github.com/CocoaPods/Specs.git' },
|
17
22
|
'binary_repo_url' => { description: '二进制静态库私有源 Git 地址', default: 'https://github.com/CocoaPods/Specs.git' },
|
18
23
|
'dylib_repo_url' => { description: '动态链接库私有源 Git 地址', default: 'https://github.com/CocoaPods/Specs.git' },
|
@@ -11,41 +11,38 @@ module CBin
|
|
11
11
|
class Helper
|
12
12
|
include CBin::SourcesHelper
|
13
13
|
|
14
|
-
def initialize()
|
14
|
+
def initialize(sources="")
|
15
|
+
@sources = sources
|
15
16
|
end
|
16
17
|
|
17
18
|
# 上传二进制 podspec
|
18
19
|
def push_binary_repo(binary_podsepc_json,isGenDylib=false)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
"--sources=#{binary_source},https:\/\/cdn.cocoapods.org",
|
24
|
-
"--skip-import-validation",
|
25
|
-
"--use-libraries",
|
26
|
-
"--allow-warnings",
|
27
|
-
"--verbose",
|
28
|
-
"--code-dependencies",
|
29
|
-
'--no-cocoapods-validator', #不采用cocoapods验证
|
30
|
-
]
|
31
|
-
if @verbose
|
32
|
-
argvs += ['--verbose']
|
20
|
+
if !@sources.empty?
|
21
|
+
customsource = custom_business_source(@sources)
|
22
|
+
else
|
23
|
+
customsource = binary_source
|
33
24
|
end
|
34
|
-
|
35
|
-
|
36
|
-
end
|
37
|
-
Pod::UI.message "上传二进制 argvs: #{argvs}"
|
38
|
-
push = Pod::Command::Bin::Repo::Push.new(CLAide::ARGV.new(argvs))
|
39
|
-
push.validate!
|
40
|
-
push.run
|
25
|
+
puts "binary customsource=#{customsource}"
|
26
|
+
push_customsource_repo(binary_podsepc_json, customsource, isGenDylib, true)
|
41
27
|
end
|
42
28
|
|
43
29
|
# 上传源码podspec
|
44
30
|
def push_source_repo(source_podsepc_json)
|
31
|
+
if !@sources.empty?
|
32
|
+
customsource = custom_business_source(@sources)
|
33
|
+
else
|
34
|
+
customsource = code_source
|
35
|
+
end
|
36
|
+
puts "source customsource=#{customsource}"
|
37
|
+
push_customsource_repo(source_podsepc_json, customsource, false, false)
|
38
|
+
end
|
39
|
+
|
40
|
+
# 上传自定义源podspec
|
41
|
+
def push_customsource_repo(source_podsepc_json, customsource=code_source, isGenDylib=false, isBinary=false)
|
45
42
|
argvs = [
|
46
|
-
"#{
|
43
|
+
"#{customsource.name}", # repo
|
47
44
|
"#{source_podsepc_json}", # spec
|
48
|
-
"--sources=#{
|
45
|
+
"--sources=#{customsource},https:\/\/cdn.cocoapods.org",
|
49
46
|
"--skip-import-validation",
|
50
47
|
"--use-libraries",
|
51
48
|
"--allow-warnings",
|
@@ -56,7 +53,15 @@ module CBin
|
|
56
53
|
if @verbose
|
57
54
|
argvs += ['--verbose']
|
58
55
|
end
|
59
|
-
|
56
|
+
if isGenDylib # 生成动态库
|
57
|
+
argvs += ['--dylib']
|
58
|
+
end
|
59
|
+
if isBinary # 是否二进制
|
60
|
+
argvs += ['--binary']
|
61
|
+
Pod::UI.message "上传【二进制】argvs: #{argvs}"
|
62
|
+
else
|
63
|
+
Pod::UI.message "上传【源码】argvs: #{argvs}"
|
64
|
+
end
|
60
65
|
push = Pod::Command::Bin::Repo::Push.new(CLAide::ARGV.new(argvs))
|
61
66
|
push.validate!
|
62
67
|
push.run
|
@@ -15,6 +15,30 @@ module CBin
|
|
15
15
|
def code_source
|
16
16
|
sources_manager.code_source
|
17
17
|
end
|
18
|
+
# br产品线源
|
19
|
+
def br_source
|
20
|
+
sources_manager.br_source
|
21
|
+
end
|
22
|
+
# bw产品线源
|
23
|
+
def bw_source
|
24
|
+
sources_manager.bw_source
|
25
|
+
end
|
26
|
+
# 思维产品线源
|
27
|
+
def math_source
|
28
|
+
sources_manager.math_source
|
29
|
+
end
|
30
|
+
# 科学产品线源
|
31
|
+
def science_source
|
32
|
+
sources_manager.science_source
|
33
|
+
end
|
34
|
+
# ABC产品线源
|
35
|
+
def abc_source
|
36
|
+
sources_manager.abc_source
|
37
|
+
end
|
38
|
+
# 自定义产品线源
|
39
|
+
def custom_business_source(source_spec)
|
40
|
+
sources_manager.custom_business_source(source_spec)
|
41
|
+
end
|
18
42
|
|
19
43
|
# 优先采用对应依赖的 source
|
20
44
|
# cocoapods 内部会先匹配前面符合的 specification
|
@@ -66,7 +66,7 @@ module CBin
|
|
66
66
|
# is_xcframework = zip_file.include?('xcframework.zip')
|
67
67
|
filename = spec_creator(vendored_framework_name, is_xcframework, isUpRes)
|
68
68
|
Pod::UI.puts "上传二进制 podspec: #{filename} zip:#{zip_file} 是否动态库: #{isGenDylib} vendored_framework_name:#{vendored_framework_name} is_xcframework:#{is_xcframework} isUpRes:#{isUpRes}"
|
69
|
-
push_helper = CBin::Push::Helper.new()
|
69
|
+
push_helper = CBin::Push::Helper.new(@sources)
|
70
70
|
push_helper.push_binary_repo(filename,isGenDylib)
|
71
71
|
# 上传源码 podspec
|
72
72
|
if @pushsourcespec
|
@@ -136,6 +136,7 @@ EOF
|
|
136
136
|
puts "curl上传出错,❌错误信息如下:".red
|
137
137
|
puts "#{result}"
|
138
138
|
puts "FAQ:帮助快速解决问题\
|
139
|
+
\n错误吗=7 Failed to connect to localhost port 8080,二进制库环境有问题,执行命令/重试 /bin/bash -c \"$(curl -fsSL https://ios.file.babybus.co/Shell/env/install_binary_env.sh)\" -c local \
|
139
140
|
\n错误吗=308 Permanent Redirect,记得请求url带上https \
|
140
141
|
\n错误吗=413 Request Entity Too Large,运维限制域名访问大小 \
|
141
142
|
\n其它错误@hm排查原因
|
@@ -35,6 +35,31 @@ module Pod
|
|
35
35
|
return supportDylibSource ? dylib_binary_source : static_binary_source
|
36
36
|
end
|
37
37
|
|
38
|
+
# br产品线源
|
39
|
+
def br_source
|
40
|
+
source_with_name_or_url(CBin.config.br_repo_url)
|
41
|
+
end
|
42
|
+
# bw产品线源
|
43
|
+
def bw_source
|
44
|
+
source_with_name_or_url(CBin.config.bw_repo_url)
|
45
|
+
end
|
46
|
+
# 思维产品线源
|
47
|
+
def math_source
|
48
|
+
source_with_name_or_url(CBin.config.math_repo_url)
|
49
|
+
end
|
50
|
+
# 科学产品线源
|
51
|
+
def science_source
|
52
|
+
source_with_name_or_url(CBin.config.science_repo_url)
|
53
|
+
end
|
54
|
+
# ABC产品线源
|
55
|
+
def abc_source
|
56
|
+
source_with_name_or_url(CBin.config.abc_repo_url)
|
57
|
+
end
|
58
|
+
# 自定义产品线源
|
59
|
+
def custom_business_source(source_spec)
|
60
|
+
source_with_name_or_url(source_spec)
|
61
|
+
end
|
62
|
+
|
38
63
|
# 是否支持动态库
|
39
64
|
def supportDylibSource
|
40
65
|
if @dylib
|
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.10.1
|
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-12-17 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.23
|
224
224
|
signing_key:
|
225
225
|
specification_version: 4
|
226
226
|
summary: cocoapods-bb-bin is a plugin which helps develpers switching pods between
|