|
|
@@ -60,8 +60,8 @@ def main(args)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
- # Figure out which dependencies are local
|
|
|
podspec_file = pod_args[0]
|
|
|
+ # Figure out which dependencies are local
|
|
|
deps = find_local_deps(podspec_file, ignore_local_podspecs.to_set)
|
|
|
arg = make_include_podspecs(deps)
|
|
|
command.push(arg) if arg
|
|
|
@@ -70,8 +70,12 @@ def main(args)
|
|
|
puts command.join(' ')
|
|
|
|
|
|
# Run the lib lint command in a thread.
|
|
|
+ pod_lint_status = 1
|
|
|
t = Thread.new do
|
|
|
- system(*command)
|
|
|
+ with_removed_social_media_url(podspec_file) do
|
|
|
+ system(*command)
|
|
|
+ pod_lint_status = $?.exitstatus
|
|
|
+ end
|
|
|
end
|
|
|
|
|
|
# Print every minute since linting can run for >10m without output.
|
|
|
@@ -83,6 +87,8 @@ def main(args)
|
|
|
puts "Still working, running for #{number_of_times_checked / 60}min."
|
|
|
end
|
|
|
end
|
|
|
+
|
|
|
+ exit(pod_lint_status)
|
|
|
end
|
|
|
|
|
|
# Loads all the specs (inclusing subspecs) from the given podspec file.
|
|
|
@@ -162,4 +168,26 @@ def trace(*args)
|
|
|
STDERR.puts(args.join(' '))
|
|
|
end
|
|
|
|
|
|
+# Edits the given podspec file to remove the social_media_url, yields, then
|
|
|
+# restores the file to its original condition. Validating of the social URL
|
|
|
+# can be very flaky (see #3416). Remove it from spec to let the actual tests
|
|
|
+# pass.
|
|
|
+def with_removed_social_media_url(spec)
|
|
|
+ podspec_content = File.read(spec)
|
|
|
+ updated_podspec_content =
|
|
|
+ podspec_content.gsub("s.social_media_url = ", "# s.social_media_url = ")
|
|
|
+ write_file(spec, updated_podspec_content)
|
|
|
+ yield
|
|
|
+
|
|
|
+ensure
|
|
|
+ write_file(spec, podspec_content)
|
|
|
+end
|
|
|
+
|
|
|
+# Writes the text in +contents+ to the file named by +filename+.
|
|
|
+def write_file(filename, contents)
|
|
|
+ File.open(filename, "w") do |file|
|
|
|
+ file.write(contents)
|
|
|
+ end
|
|
|
+end
|
|
|
+
|
|
|
main(ARGV)
|