Merge pull request #156 from TouchInstinct/feature/experimential_rome

Feature/experimential rome
This commit is contained in:
Loupehope 2020-01-23 18:51:47 +03:00 committed by GitHub
commit 85947a143e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 10 deletions

View File

@ -13,19 +13,37 @@ private_lane :installDependencies do |options|
bundle_install(path: "../.gem")
end
if File.exists? "../Cartfile"
begin
carthage(command: "bootstrap", platform: "iOS")
rescue
# workaround for https://github.com/Carthage/Carthage/issues/2298
sh("rm -rf ~/Library/Caches/org.carthage.CarthageKit")
carthage(command: "update", platform: "iOS", cache_builds: true)
end
end
cocoapods(
repo_update: true
)
if File.exists? "../Cartfile"
use_rome = File.exists? "../Romefile"
swift_version = sh("xcrun swift --version | head -1 | sed 's/.*\\(\(.*\)\\).*/\\1/' | tr -d \"()\" | tr \" \" \"-\"").chop
rome_path = "Pods/Rome/rome"
rome_options = "--platform iOS --cache-prefix #{swift_version} --romefile Romefile"
carthage_install = lambda do
if use_rome
sh("cd .. && #{rome_path} download #{rome_options}")
end
carthage(command: "bootstrap", platform: "iOS", cache_builds: true)
if use_rome
sh("cd .. && #{rome_path} list --missing #{rome_options} | awk '{print $1}' | xargs -I framework_name #{rome_path} upload framework_name #{rome_options}")
end
end
begin
carthage_install.call
rescue
# workaround for https://github.com/Carthage/Carthage/issues/2298
sh("rm -rf ~/Library/Caches/org.carthage.CarthageKit")
carthage_install.call
end
end
end
private_lane :uploadToFabric do |options|