# Conflicts: # lib/cocoapods-binary/rome/build_framework.rb
This commit is contained in:
commit
b48a32c562
18
.travis.yml
18
.travis.yml
@ -1,19 +1,19 @@
|
||||
osx_image: xcode12.2
|
||||
language: objective-c
|
||||
cache:
|
||||
- cocoapods
|
||||
- bundler
|
||||
- cocoapods
|
||||
- bundler
|
||||
gemfile: test/Gemfile
|
||||
before_install:
|
||||
- unset CPATH
|
||||
- unset CPATH
|
||||
install:
|
||||
- bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
||||
- bundle exec pod setup
|
||||
- bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
||||
- bundle exec pod setup
|
||||
script:
|
||||
- rake install
|
||||
- cd test
|
||||
- sh test.sh
|
||||
- cd ..
|
||||
- rake install
|
||||
- cd test
|
||||
- sh test.sh
|
||||
- cd ..
|
||||
|
||||
# auto deploy on tagging
|
||||
# automatically set by `travis setup rubygems`
|
||||
|
||||
@ -11,20 +11,14 @@ module Pod
|
||||
private
|
||||
|
||||
def local_manifest
|
||||
if not @local_manifest_inited
|
||||
@local_manifest_inited = true
|
||||
raise "This method should be call before generate project" unless self.analysis_result == nil
|
||||
@local_manifest = self.sandbox.manifest
|
||||
end
|
||||
@local_manifest
|
||||
self.sandbox.manifest
|
||||
end
|
||||
|
||||
# @return [Analyzer::SpecsState]
|
||||
def prebuild_pods_changes
|
||||
return nil if local_manifest.nil?
|
||||
if @prebuild_pods_changes.nil?
|
||||
changes = local_manifest.detect_changes_with_podfile(podfile)
|
||||
@prebuild_pods_changes = Analyzer::SpecsState.new(changes)
|
||||
if @prebuild_pods_changes.nil? && !self.analysis_result.nil?
|
||||
@prebuild_pods_changes = self.analysis_result.sandbox_state
|
||||
# save the chagnes info for later stage
|
||||
Pod::Prebuild::Passer.prebuild_pods_changes = @prebuild_pods_changes
|
||||
end
|
||||
@ -40,6 +34,8 @@ module Pod
|
||||
return false if local_manifest == nil
|
||||
|
||||
changes = prebuild_pods_changes
|
||||
return false if changes.nil?
|
||||
|
||||
added = changes.added
|
||||
changed = changes.changed
|
||||
unchanged = changes.unchanged
|
||||
|
||||
@ -46,6 +46,7 @@ def build_for_iosish_platform(sandbox,
|
||||
device_framework_path = "#{build_dir}/#{CONFIGURATION}-#{device}/#{module_name}.framework"
|
||||
simulator_framework_path = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{module_name}.framework"
|
||||
end
|
||||
output_framework_path = "#{output_path}/#{module_name}.framework"
|
||||
|
||||
device_binary = device_framework_path + "/#{module_name}"
|
||||
simulator_binary = simulator_framework_path + "/#{module_name}"
|
||||
@ -90,6 +91,7 @@ def build_for_iosish_platform(sandbox,
|
||||
|
||||
# handle the dSYM files
|
||||
device_dsym = "#{device_framework_path}.dSYM"
|
||||
device_dsym_output_path = "#{output_framework_path}.dSYM"
|
||||
if File.exist? device_dsym
|
||||
# lipo the simulator dsym
|
||||
simulator_dsym = "#{simulator_framework_path}.dSYM"
|
||||
@ -100,12 +102,14 @@ def build_for_iosish_platform(sandbox,
|
||||
FileUtils.mv tmp_lipoed_binary_path, "#{device_framework_path}.dSYM/Contents/Resources/DWARF/#{module_name}", :force => true
|
||||
end
|
||||
# move
|
||||
FileUtils.mv device_dsym, output_path, :force => true
|
||||
FileUtils.rm_r device_dsym_output_path if Dir.exist? device_dsym_output_path
|
||||
File.rename device_dsym, device_dsym_output_path
|
||||
end
|
||||
|
||||
# output
|
||||
output_path.mkpath unless output_path.exist?
|
||||
FileUtils.mv device_framework_path, output_path, :force => true
|
||||
FileUtils.rm_r output_framework_path if Dir.exist? output_framework_path
|
||||
File.rename device_framework_path, output_framework_path
|
||||
|
||||
end
|
||||
|
||||
|
||||
@ -32,6 +32,13 @@ def save_to_podfile(text):
|
||||
file.write( "" if len(text) <= 2 else text[2])
|
||||
file.close()
|
||||
|
||||
if len(text) > 3:
|
||||
path = os.path.dirname(os.path.abspath(__file__))
|
||||
path += "/Podfile.lock"
|
||||
file = open(path, "w+")
|
||||
file.write(text[3])
|
||||
file.close()
|
||||
|
||||
|
||||
|
||||
def initial():
|
||||
@ -233,6 +240,167 @@ class A {
|
||||
"""
|
||||
)
|
||||
|
||||
def oldPodVersion():
|
||||
return (wrapper(
|
||||
"""
|
||||
pod "ReactiveSwift", "= 3.0.0", :binary => true
|
||||
""") ,
|
||||
"""
|
||||
import ReactiveSwift
|
||||
class A {
|
||||
// Works on 3.x but not 4.x
|
||||
let a = A.b(SignalProducer<Int, NSError>.empty)
|
||||
static func b<U: BindingSource>(_ b: U) -> Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
"""
|
||||
)
|
||||
|
||||
def upgradePodVersion():
|
||||
return (wrapper(
|
||||
"""
|
||||
pod "ReactiveSwift", "= 4.0.0", :binary => true
|
||||
""") ,
|
||||
"""
|
||||
import ReactiveSwift
|
||||
class A {
|
||||
func b() {
|
||||
// Works on 4.x but not 3.x
|
||||
Lifetime.make().token.dispose()
|
||||
}
|
||||
}
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
def originalPodfileAndLockfileVersion():
|
||||
return (wrapper(
|
||||
"""
|
||||
pod "Result", "= 3.2.2", :binary => true
|
||||
""") ,
|
||||
"""
|
||||
import Result
|
||||
class A {
|
||||
// Works on 3.x but not 4.x
|
||||
var err: ErrorProtocolConvertible?
|
||||
}
|
||||
""", "",
|
||||
"""
|
||||
PODS:
|
||||
- Result (3.2.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Result (= 3.2.2)
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- Result
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Result: 4edd39003fdccf281d418ee1b006571f70123250
|
||||
|
||||
PODFILE CHECKSUM: 578d759c1f6329e159731bc0a232fb9051977130
|
||||
|
||||
COCOAPODS: 1.6.1
|
||||
"""
|
||||
)
|
||||
|
||||
def upgradePodfileAndLockfileVersion():
|
||||
return (wrapper(
|
||||
"""
|
||||
pod "Result", "= 4.0.0", :binary => true
|
||||
""") ,
|
||||
"""
|
||||
import Result
|
||||
class A {
|
||||
// Works on 4.x but not 3.x
|
||||
var err: ErrorConvertible?
|
||||
}
|
||||
""", "",
|
||||
"""
|
||||
PODS:
|
||||
- Result (4.0.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Result (= 4.0.0)
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- Result
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713
|
||||
|
||||
PODFILE CHECKSUM: ee7fa7b9f6dade6905c2b00142c54f164bdc2ceb
|
||||
|
||||
COCOAPODS: 1.6.1
|
||||
"""
|
||||
)
|
||||
|
||||
def originalLockfileVersion():
|
||||
return (wrapper(
|
||||
"""
|
||||
pod "Result", :binary => true
|
||||
""") ,
|
||||
"""
|
||||
import Result
|
||||
class A {
|
||||
// Works on 3.x but not 4.x
|
||||
var err: ErrorProtocolConvertible?
|
||||
}
|
||||
""", "",
|
||||
"""
|
||||
PODS:
|
||||
- Result (3.2.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Result
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- Result
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Result: 4edd39003fdccf281d418ee1b006571f70123250
|
||||
|
||||
PODFILE CHECKSUM: 8705dea54636097dca87d2a49ac6963c842b6eb4
|
||||
|
||||
COCOAPODS: 1.6.1
|
||||
"""
|
||||
)
|
||||
|
||||
def upgradeLockfileVersion():
|
||||
return (wrapper(
|
||||
"""
|
||||
pod "Result", :binary => true
|
||||
""") ,
|
||||
"""
|
||||
import Result
|
||||
class A {
|
||||
// Works on 4.x but not 3.x
|
||||
var err: ErrorConvertible?
|
||||
}
|
||||
""", "",
|
||||
"""
|
||||
PODS:
|
||||
- Result (4.0.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Result
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- Result
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713
|
||||
|
||||
PODFILE CHECKSUM: 8705dea54636097dca87d2a49ac6963c842b6eb4
|
||||
|
||||
COCOAPODS: 1.6.1
|
||||
"""
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
arg = sys.argv[1]
|
||||
|
||||
@ -1,15 +1,20 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
clean() {
|
||||
rm -rf ~/Library/Developer/Xcode/DerivedData/*/
|
||||
}
|
||||
|
||||
build() {
|
||||
xcodebuild -workspace Binary.xcworkspace -scheme Binary ONLY_ACTIVE_ARCH=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO -quiet || exit 1
|
||||
}
|
||||
|
||||
rm -rf Pods
|
||||
|
||||
cases=("initial" "addSwiftPod" "revertToSourceCode" "addDifferentNamePod" "addSubPod" "deleteAPod" "addVendoredLibPod" "universalFlag" "multiplePlatforms" "multiplePlatformsWithALLFlag")
|
||||
cases=("initial" "addSwiftPod" "revertToSourceCode" "addDifferentNamePod" "addSubPod" "deleteAPod" "addVendoredLibPod" "universalFlag" "multiplePlatforms" "multiplePlatformsWithALLFlag" "oldPodVersion" "upgradePodVersion" "originalPodfileAndLockfileVersion" "upgradePodfileAndLockfileVersion" "originalLockfileVersion" "upgradeLockfileVersion")
|
||||
for action in ${cases[@]}; do
|
||||
python change_podfile.py ${action}
|
||||
clean
|
||||
bundle exec pod install
|
||||
build
|
||||
done
|
||||
|
||||
Loading…
Reference in New Issue
Block a user