lib/builder.rb in cocoapods-packager-0.3.0 vs lib/builder.rb in cocoapods-packager-0.4.0
- old
+ new
@@ -61,14 +61,14 @@
def build_static_lib_for_ios(static_libs, defines, output)
`libtool -static -o #{@sandbox_root}/build/package.a #{static_libs.join(' ')}`
xcodebuild(defines, '-sdk iphonesimulator', 'build-sim')
- sim_libs = static_libs.map { |path| "#{@sandbox_root}/build-sim/#{File.basename(path)}" }
+ sim_libs = static_libs_in_sandbox('build-sim')
`libtool -static -o #{@sandbox_root}/build-sim/package.a #{sim_libs.join(' ')}`
- `lipo #{@sandbox_root}/build/package.a #{@sandbox_root}/build-sim/libPods.a -create -output #{output}`
+ `lipo #{@sandbox_root}/build/package.a #{@sandbox_root}/build-sim/package.a -create -output #{output}`
end
def build_static_lib_for_mac(static_libs, output)
`libtool -static -o #{output} #{static_libs.join(' ')}`
end
@@ -121,11 +121,11 @@
path_specs.map do |path_spec|
Dir.glob(File.join(@source_dir, path_spec))
end
end
- def static_libs_in_sandbox
- Dir.glob("#{@sandbox_root}/build/*.a").reject { |e| e =~ /libPods\.a$/ }
+ def static_libs_in_sandbox(build_dir='build')
+ Dir.glob("#{@sandbox_root}/#{build_dir}/*.a").reject { |e| e =~ /libPods\.a$/ }
end
def xcodebuild(defines = '', args = '', build_dir = 'build')
`xcodebuild #{defines} CONFIGURATION_BUILD_DIR=#{build_dir} clean build #{args} -configuration Release -target Pods -project #{@sandbox_root}/Pods.xcodeproj 2>&1`
end