|
|
@@ -3,17 +3,6 @@ fastlane_version "1.37.0"
|
|
|
default_platform :ios
|
|
|
|
|
|
platform :ios do
|
|
|
- def normalize_destination(destination)
|
|
|
- return destination if destination.to_s.empty?
|
|
|
- return destination if destination.include?("arch=")
|
|
|
- return destination unless destination.include?("Simulator")
|
|
|
-
|
|
|
- host_arch = Actions.sh("uname -m", log: false).strip
|
|
|
- return destination unless host_arch == "arm64"
|
|
|
-
|
|
|
- "#{destination},arch=arm64"
|
|
|
- end
|
|
|
-
|
|
|
desc "Runs all the tests"
|
|
|
lane :tests do
|
|
|
test(destination: "platform=macOS")
|
|
|
@@ -35,22 +24,20 @@ platform :ios do
|
|
|
end
|
|
|
|
|
|
lane :test do |options|
|
|
|
- destination = normalize_destination(options[:destination])
|
|
|
scan(
|
|
|
scheme: "Kingfisher",
|
|
|
clean: true,
|
|
|
xcargs: "SWIFT_VERSION=5.0",
|
|
|
- destination: destination
|
|
|
+ destination: options[:destination]
|
|
|
)
|
|
|
end
|
|
|
|
|
|
lane :build do |options|
|
|
|
- destination = normalize_destination(options[:destination])
|
|
|
xcodebuild(
|
|
|
workspace: "Kingfisher.xcworkspace",
|
|
|
configuration: "Debug",
|
|
|
scheme: "Kingfisher",
|
|
|
- destination: destination,
|
|
|
+ destination: options[:destination],
|
|
|
build: true,
|
|
|
build_settings: {
|
|
|
"SWIFT_VERSION" => "5.0"
|