cocoapods-bb-bin 0.2.7.10 → 0.2.7.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-bb-bin/command/bin/code.rb +10 -2
- data/lib/cocoapods-bb-bin/config/config_builder.rb +5 -1
- data/lib/cocoapods-bb-bin/gem_version.rb +1 -1
- data/lib/cocoapods-bb-bin/helpers/framework_builder.rb +5 -1
- data/lib/cocoapods-bb-bin/helpers/spec_source_creator.rb +22 -6
- data/lib/cocoapods-bb-bin/helpers/upload_helper.rb +11 -1
- data/lib/cocoapods-bb-bin/helpers/xcframework_builder.rb +20 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef6e723659917a02b23b7fa92a8e34630bd1d6526cb9d972f8583a570f12bfde
|
4
|
+
data.tar.gz: a3620ac0ba8003bda68bf6d57af984e77f6a0143795f5e72ec0db8632eccd02c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e24a99b89a9bfc8245e02e70640f989bbbef0cfefd99cff3652d7df387a892b9e1d1152a021f8c67f949d89fe9a3c87ccf006b114cf6a4ab711139ae6e2771e9
|
7
|
+
data.tar.gz: 8c5169d2da2229bd14ae8959d520bf5539fad6efed981a46952fd0c32431d81e0abcc6421e33c05ba11ae81aa261cd6e49cbe41103db9f30d8efd8c3a1a07e94
|
@@ -137,7 +137,11 @@ EOF
|
|
137
137
|
unless File.exist?(dir)
|
138
138
|
# UI.puts "不存在 = #{dir}"
|
139
139
|
begin
|
140
|
-
|
140
|
+
unless File.exist?(dir)
|
141
|
+
require "fileutils"
|
142
|
+
FileUtils.mkdir_p(dir)
|
143
|
+
end
|
144
|
+
# FileUtils.mkdir_p(dir) unless File.exists?(dir) # require 'fileutils'
|
141
145
|
rescue SystemCallError
|
142
146
|
# mkdir: _fzzfm3x4y17bm6psx9yhbs00000gn: Permission denied
|
143
147
|
unless File.exist?(dir)
|
@@ -285,7 +289,11 @@ EOF
|
|
285
289
|
|
286
290
|
def source_root
|
287
291
|
dir = File.join(@config.cache_root,"Source")
|
288
|
-
|
292
|
+
unless File.exist?(dir)
|
293
|
+
require "fileutils"
|
294
|
+
FileUtils.mkdir_p(dir)
|
295
|
+
end
|
296
|
+
# FileUtils.mkdir_p(dir) unless File.exist? dir
|
289
297
|
dir
|
290
298
|
end
|
291
299
|
|
@@ -215,7 +215,11 @@ module CBin
|
|
215
215
|
# root_name = File.join(parent_dir,"#{basename}-build-temp")
|
216
216
|
# Dir.mkdir(root_name) unless File.exist?root_name
|
217
217
|
root_name = File.join(parent_dir,"/build/#{basename}") # 统一修改build目录
|
218
|
-
|
218
|
+
unless File.exist?(root_name)
|
219
|
+
require "fileutils"
|
220
|
+
FileUtils.mkdir_p(root_name)
|
221
|
+
end
|
222
|
+
# FileUtils.mkdir_p(root_name) unless File.exists?(root_name) # require 'fileutils'
|
219
223
|
Pathname.new(root_name)
|
220
224
|
end
|
221
225
|
|
@@ -95,7 +95,11 @@ module CBin
|
|
95
95
|
FileUtils.rm_rf(target_dir) if File.exist?(target_dir)
|
96
96
|
|
97
97
|
zip_dir = CBin::Config::Builder.instance.zip_dir
|
98
|
-
|
98
|
+
unless File.exist?(zip_dir)
|
99
|
+
require "fileutils"
|
100
|
+
FileUtils.mkdir_p(zip_dir)
|
101
|
+
end
|
102
|
+
# FileUtils.mkdir_p(zip_dir) unless File.exist?(zip_dir)
|
99
103
|
|
100
104
|
`cp -fa #{@platform}/#{framework_name} #{target_dir}`
|
101
105
|
end
|
@@ -37,8 +37,12 @@ module CBin
|
|
37
37
|
|
38
38
|
def write_spec_file(file = filename)
|
39
39
|
create unless spec
|
40
|
-
|
41
|
-
|
40
|
+
dir = CBin::Config::Builder.instance.binary_json_dir
|
41
|
+
unless File.exist?(dir)
|
42
|
+
require "fileutils"
|
43
|
+
FileUtils.mkdir_p(dir)
|
44
|
+
end
|
45
|
+
# FileUtils.mkdir_p(dir) unless File.exist?(dir)
|
42
46
|
FileUtils.rm_rf(file) if File.exist?(file)
|
43
47
|
|
44
48
|
File.open(file, 'w+') do |f|
|
@@ -46,8 +50,8 @@ module CBin
|
|
46
50
|
end
|
47
51
|
|
48
52
|
@filename = file
|
49
|
-
# Pod::UI::puts "===copy origin file: #{file}"
|
50
|
-
# Pod::UI::puts "===copy desc file: #{sourceSpecFilePath}"
|
53
|
+
# Pod::UI::puts "===copy origin file: #{file}".red
|
54
|
+
# Pod::UI::puts "===copy desc file: #{sourceSpecFilePath}".red
|
51
55
|
# 拷贝二进制spec到源码spec by hm 22/1/19
|
52
56
|
`cp -fa #{file} #{sourceSpecFilePath}`
|
53
57
|
end
|
@@ -145,15 +149,27 @@ module CBin
|
|
145
149
|
# vendored_frameworks | resources | source | source_files | public_header_files
|
146
150
|
# license | resource_bundles | vendored_libraries
|
147
151
|
|
152
|
+
fkname = "#{frameworkName}.{framework,xcframework}" # 支持framework、xcframework
|
148
153
|
# Project Linkin
|
149
|
-
@spec.vendored_frameworks = "#{
|
154
|
+
@spec.vendored_frameworks = "#{fkname}"
|
150
155
|
|
151
156
|
# Resources # framework以业务方自己配置为主 by hm 23/10/18
|
152
157
|
extnames = []
|
153
158
|
extnames << '*.bundle' if code_spec_consumer.resource_bundles.any?
|
154
159
|
if code_spec_consumer.resources.any?
|
155
160
|
# extnames += code_spec_consumer.resources.map { |r| File.basename(r) }
|
156
|
-
|
161
|
+
puts "create_framework_from_code_spec extnames:#{extnames}".red
|
162
|
+
puts "code_spec_consumer:#{code_spec_consumer}".red
|
163
|
+
puts "is_xcframework:#{is_xcframework}".red
|
164
|
+
# 自有库bundle需要修改路径,二进制生成在xx.xcframework/xx.bundle by hm 24/2/28
|
165
|
+
if is_xcframework == true
|
166
|
+
code_spec_consumer.resources.map { |r|
|
167
|
+
bundle_comp = File.basename(r)
|
168
|
+
extnames << "#{fkname}/#{bundle_comp}"
|
169
|
+
}
|
170
|
+
else
|
171
|
+
extnames = code_spec_consumer.resources
|
172
|
+
end
|
157
173
|
end
|
158
174
|
if extnames.any?
|
159
175
|
@spec.resources = extnames
|
@@ -37,7 +37,17 @@ module CBin
|
|
37
37
|
isupload = binary_upload(zip_file)
|
38
38
|
puts "上传二进制文件完成 状态:#{isupload}".green
|
39
39
|
if isupload
|
40
|
-
is_xcframework =
|
40
|
+
is_xcframework = false
|
41
|
+
[
|
42
|
+
"xcframework.zip", # 三方库
|
43
|
+
"xcframework_#{@spec.version}.zip", # 自有库
|
44
|
+
].each do |name|
|
45
|
+
is_xcframework = zip_file.include?(name)
|
46
|
+
if is_xcframework == true
|
47
|
+
break
|
48
|
+
end
|
49
|
+
end
|
50
|
+
# is_xcframework = zip_file.include?('xcframework.zip')
|
41
51
|
filename = spec_creator(vendored_framework_name, is_xcframework)
|
42
52
|
Pod::UI.puts "上传二进制 podspec: #{filename} zip:#{zip_file} 是否动态库: #{isGenDylib} vendored_framework_name:#{vendored_framework_name} is_xcframework:#{is_xcframework}"
|
43
53
|
push_helper = CBin::Push::Helper.new()
|
@@ -61,6 +61,14 @@ module CBin
|
|
61
61
|
target_dir = File.join(framework_folder_path,framework_name)
|
62
62
|
return target_dir
|
63
63
|
end
|
64
|
+
def podspec_name
|
65
|
+
file_name = "#{@spec.name}.podspec.json"
|
66
|
+
return file_name
|
67
|
+
end
|
68
|
+
def podspec_file_path
|
69
|
+
target_dir = File.join(framework_folder_path,podspec_name)
|
70
|
+
return target_dir
|
71
|
+
end
|
64
72
|
|
65
73
|
def cp_to_source_dir
|
66
74
|
|
@@ -68,10 +76,21 @@ module CBin
|
|
68
76
|
FileUtils.rm_rf(target_dir) if File.exist?(target_dir)
|
69
77
|
|
70
78
|
zip_dir = CBin::Config::Builder.instance.zip_dir
|
71
|
-
|
79
|
+
unless File.exist?(zip_dir)
|
80
|
+
require "fileutils"
|
81
|
+
FileUtils.mkdir_p(zip_dir)
|
82
|
+
end
|
83
|
+
# FileUtils.mkdir_p(zip_dir) unless File.exist?(zip_dir)
|
72
84
|
|
73
85
|
UI.puts "Compressing #{framework_file_path} into #{target_dir}"
|
86
|
+
|
87
|
+
# `cp -fa #{framework_file_path} #{target_dir}` # xcframework文件拷贝
|
74
88
|
`cp -fa #{framework_file_path} #{target_dir} && rm -rf #{framework_folder_path}` # xcframework文件拷贝 & 删除源文件
|
89
|
+
|
90
|
+
# 是否可以考虑以xcframework配置为主???
|
91
|
+
# spec_dir = CBin::Config::Builder.instance.local_psec_dir
|
92
|
+
# puts "spec_dir:#{spec_dir}".red
|
93
|
+
# `cp -fa #{podspec_file_path} #{spec_dir} && ls -al #{spec_dir}`
|
75
94
|
end
|
76
95
|
end
|
77
96
|
end
|
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.7.
|
4
|
+
version: 0.2.7.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- humin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -70,7 +70,7 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 0.2.6.
|
73
|
+
version: 0.2.6.4
|
74
74
|
- - "<"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '1.0'
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 0.2.6.
|
83
|
+
version: 0.2.6.4
|
84
84
|
- - "<"
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '1.0'
|
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
- !ruby/object:Gem::Version
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
|
-
rubygems_version: 3.
|
209
|
+
rubygems_version: 3.5.6
|
210
210
|
signing_key:
|
211
211
|
specification_version: 4
|
212
212
|
summary: cocoapods-bb-bin is a plugin which helps develpers switching pods between
|