lib/pod_builder/command/build.rb in pod-builder-0.9.4 vs lib/pod_builder/command/build.rb in pod-builder-0.9.5
- old
+ new
@@ -48,11 +48,11 @@
# We need to split pods to build in 3 groups
# 1. subspecs: because the resulting .framework path is treated differently when added to Configuration.subspecs_to_split
# 2. pods to build in release
# 3. pods to build in debug
- check_not_building_development_pods(pods_to_build)
+ check_not_building_development_pods(pods_to_build, options)
pods_to_build_subspecs = pods_to_build.select { |x| x.is_subspec && Configuration.subspecs_to_split.include?(x.name) }
# Remove dependencies from pods to build
all_dependencies_name = pods_to_build.map(&:dependency_names).flatten.uniq
@@ -213,11 +213,11 @@
unless invalid_subspecs.count > 0
return
end
- warn_message = "The following pods `#{invalid_subspecs.join(" ")}` are non static frameworks which are being splitted over different targets. Beware that this is an unsafe setup as per https://github.com/CocoaPods/CocoaPods/issues/5708 and https://github.com/CocoaPods/CocoaPods/issues/5643\n"
+ warn_message = "The following pods `#{invalid_subspecs.join(" ")}` are non static frameworks which are being splitted over different targets. Beware that this is an unsafe setup as per https://github.com/CocoaPods/CocoaPods/issues/5708 and https://github.com/CocoaPods/CocoaPods/issues/5643\n\nYou can ignore this error by passing the `--allow-warnings` flag to the build command\n"
if options[:allow_warnings]
puts "\n\n⚠️ #{warn_message}".yellow
else
raise "\n\n🚨️ #{warn_message}".yellow
end
@@ -235,13 +235,13 @@
raise "Dependencies of `#{pod.name}` don't have the same build configuration (#{pod.build_configuration}) of `#{pods_with_unaligned_build_configuration.join(",")}`'s dependencies" if pods_with_unaligned_build_configuration.count > 0
end
end
- def self.check_not_building_development_pods(pods)
- if (development_pods = pods.select { |x| x.is_development_pod }) && development_pods.count > 0
+ def self.check_not_building_development_pods(pods, options)
+ if (development_pods = pods.select { |x| x.is_development_pod }) && development_pods.count > 0 && options[:allow_warnings].nil?
pod_names = development_pods.map(&:name).join(", ")
- raise "Cannot build the following pods: `#{pod_names}` in development mode"
+ raise "The following pods are in development mode: `#{pod_names}`, won't proceed building.\n\nYou can ignore this error by passing the `--allow-warnings` flag to the build command\n"
end
end
def self.other_subspecs(pods_to_build, buildable_items)
buildable_subspecs = buildable_items.select { |x| x.is_subspec }