cocoapods-packager-ext 0.0.25 → 0.0.30
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-packager-ext/command/package_ext.rb +3 -2
- data/lib/cocoapods-packager-ext/ext/builder.rb +46 -3
- data/lib/cocoapods-packager-ext/ext/pod_utils.rb +1 -1
- data/lib/cocoapods-packager-ext/ext/validator.rb +25 -0
- data/lib/cocoapods-packager-ext/gem_version.rb +1 -1
- data/lib/cocoapods_plugin.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cf3493cfe83b8790bdfa13709f4e84bb20db74fbde3119238271bb70116a956
|
4
|
+
data.tar.gz: 8e2e9067e59073349177faca6d4bc639b77702b1382a219e106b0a3b5b990588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d75c72039e332ed8c440c2ada29ab66a1856964f1c45eb1cd3ce74d65e5f7c6585ef215670e40b12b59c986c89d60d527d9aac138c9beccce1bb880c251e454
|
7
|
+
data.tar.gz: e743071dc7bc7c06e1142f6bba438c60c225ba529e423ecfa72d2550e82648122e6e0f9feefbcb833ff258200d348a68bad437374e612508d565deff8d388204
|
@@ -65,7 +65,8 @@ module Pod
|
|
65
65
|
begin
|
66
66
|
perform_build(platform, static_sandbox, dynamic_sandbox, static_installer)
|
67
67
|
ensure # in case the build fails; see Builder#xcodebuild.
|
68
|
-
if
|
68
|
+
if ENV['ENABLE_BACKUP_WORKSPACE'] && (ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'YES' || ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'TRUE')
|
69
|
+
else
|
69
70
|
Pathname.new(config.sandbox_root).rmtree
|
70
71
|
FileUtils.rm_f('Podfile.lock')
|
71
72
|
end
|
@@ -77,7 +78,7 @@ module Pod
|
|
77
78
|
s.#{platform.name.to_s}.deployment_target = '#{platform.deployment_target}'
|
78
79
|
s.#{platform.name.to_s}.vendored_libraries = ['#{platform.name.to_s}/*.a']
|
79
80
|
s.#{platform.name.to_s}.public_header_files = ['#{platform.name.to_s}/Headers/*.{h}']
|
80
|
-
s.#{platform.name.to_s}.source_files = ['#{platform.name.to_s}/Headers/*.{h}']
|
81
|
+
s.#{platform.name.to_s}.source_files = ['#{platform.name.to_s}/Headers/*.{h}',"#{platform.name.to_s}/Modules/module.modulemap"]
|
81
82
|
s.#{platform.name.to_s}.resource = ['#{platform.name.to_s}/Resources/*.bundle']
|
82
83
|
s.#{platform.name.to_s}.module_map = "#{platform.name.to_s}/Modules/module.modulemap"
|
83
84
|
RB
|
@@ -5,7 +5,23 @@ module Pod
|
|
5
5
|
|
6
6
|
alias build_static_library_t build_static_library
|
7
7
|
def build_static_library
|
8
|
-
|
8
|
+
|
9
|
+
UI.puts("Building static library #{@spec} with configuration #{@config}")
|
10
|
+
|
11
|
+
defines = compile
|
12
|
+
build_sim_libraries(defines)
|
13
|
+
|
14
|
+
platform_path = Pathname.new(@platform.name.to_s)
|
15
|
+
platform_path.mkdir unless platform_path.exist?
|
16
|
+
|
17
|
+
output = platform_path + "lib#{@spec.name}-#{@platform.name.to_s}.a"
|
18
|
+
|
19
|
+
if @platform.name == :ios
|
20
|
+
build_static_library_for_ios(output)
|
21
|
+
else
|
22
|
+
build_static_library_for_mac(output)
|
23
|
+
end
|
24
|
+
|
9
25
|
platform_path = Pathname.new(@platform.name.to_s)
|
10
26
|
header_path = platform_path+'Headers'
|
11
27
|
header_path.mkpath unless header_path.exist?
|
@@ -61,7 +77,7 @@ module Pod
|
|
61
77
|
end
|
62
78
|
|
63
79
|
def ios_build_options
|
64
|
-
if ENV['DISABLE_BITCODE']
|
80
|
+
if ENV['DISABLE_BITCODE'] && (ENV['DISABLE_BITCODE'].upcase == 'YES' || ENV['DISABLE_BITCODE'].upcase == 'TRUE')
|
65
81
|
"ARCHS=\'#{ios_architectures.join(' ')}\' OTHER_CFLAGS=\'-Qunused-arguments\'"
|
66
82
|
else
|
67
83
|
"ARCHS=\'#{ios_architectures.join(' ')}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
|
@@ -167,7 +183,7 @@ MAP
|
|
167
183
|
|
168
184
|
alias copy_resources_t copy_resources
|
169
185
|
def copy_resources
|
170
|
-
copy_resources_to_target @fwk.resources_path
|
186
|
+
copy_resources_to_target @fwk.resources_path unless @dynamic
|
171
187
|
end
|
172
188
|
def copy_resources_to_target(resources_target_path = nil )
|
173
189
|
resources_target_path = @fwk.resources_path if resources_target_path.nil?
|
@@ -212,6 +228,33 @@ MAP
|
|
212
228
|
end
|
213
229
|
end
|
214
230
|
|
231
|
+
alias xcodebuild_t xcodebuild
|
232
|
+
|
233
|
+
def xcodebuild(defines = '', args = '', build_dir = 'build', target = 'Pods-packager', project_root = @static_sandbox_root, config = @config)
|
234
|
+
if defined?(Pod::DONT_CODESIGN)
|
235
|
+
args = "#{args} CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO"
|
236
|
+
end
|
237
|
+
|
238
|
+
command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{config} -target #{target} -project #{project_root}/Pods.xcodeproj 2>&1"
|
239
|
+
output = `#{command}`.lines.to_a
|
240
|
+
|
241
|
+
if $?.exitstatus != 0
|
242
|
+
if ENV['ENABLE_BACKUP_WORKSPACE'] && (ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'YES' || ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'TRUE')
|
243
|
+
target_dir = "#{@source_dir}/#{@spec.name}-#{@spec.version}"
|
244
|
+
work_dir = Dir.pwd
|
245
|
+
`mv "#{work_dir}" "#{target_dir}"`
|
246
|
+
end
|
247
|
+
puts UI::BuildFailedReport.report(command, output)
|
248
|
+
|
249
|
+
# Note: We use `Process.exit` here because it fires a `SystemExit`
|
250
|
+
# exception, which gives the caller a chance to clean up before the
|
251
|
+
# process terminates.
|
252
|
+
#
|
253
|
+
# See http://ruby-doc.org/core-1.9.3/Process.html#method-c-exit
|
254
|
+
Process.exit
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
215
258
|
alias initialize_t initialize
|
216
259
|
def initialize(platform, static_installer, source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps,exclude_dep_items=[],select_archs=[])
|
217
260
|
@exclude_dep_items = exclude_dep_items
|
@@ -45,7 +45,7 @@ module Pod
|
|
45
45
|
config.build_settings['USER_HEADER_SEARCH_PATHS'] = "$(inherited) #{header_path}"
|
46
46
|
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -ObjC'
|
47
47
|
|
48
|
-
if ENV['DISABLE_BITCODE']
|
48
|
+
if ENV['DISABLE_BITCODE'] && (ENV['DISABLE_BITCODE'].upcase == 'YES' || ENV['DISABLE_BITCODE'].upcase == 'TRUE')
|
49
49
|
config.build_settings['ENABLE_BITCODE'] = 'NO'
|
50
50
|
end
|
51
51
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
module Pod
|
3
|
+
class Validator
|
4
|
+
|
5
|
+
alias _xcodebuild_t _xcodebuild
|
6
|
+
def _xcodebuild(command, raise_on_failure = false)
|
7
|
+
begin
|
8
|
+
_xcodebuild_t(command, raise_on_failure)
|
9
|
+
rescue => e
|
10
|
+
if ENV['PUSH_BACKUP_PATH']
|
11
|
+
for item in command
|
12
|
+
if item.include?(".xcworkspace")
|
13
|
+
# puts command.join(' ')
|
14
|
+
path = Pathname.new(item).parent
|
15
|
+
puts path
|
16
|
+
`mv #{path} #{ENV['PUSH_BACKUP_PATH']}`
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
raise e
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
data/lib/cocoapods_plugin.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-packager-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kyle.zhou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- lib/cocoapods-packager-ext/ext/downloader/lnpath.rb
|
74
74
|
- lib/cocoapods-packager-ext/ext/downloader_ext.rb
|
75
75
|
- lib/cocoapods-packager-ext/ext/pod_utils.rb
|
76
|
+
- lib/cocoapods-packager-ext/ext/validator.rb
|
76
77
|
- lib/cocoapods-packager-ext/gem_version.rb
|
77
78
|
- lib/cocoapods_plugin.rb
|
78
79
|
- spec/command/ext_spec.rb
|