stripe-ios/ci_scripts/check_spm_warnings.rb

10 lines
324 B
Ruby
Executable File

#!/usr/bin/env ruby
puts 'Checking for SPM warnings...'
spm_results = `swift build --target none 2>&1`
warnings = spm_results.lines.filter { |line| line.include?('warning') }.join('\n')
abort("Package.swift contains warnings:\n#{warnings}\nOpen Package.swift to view/resolve.") unless warnings.empty?
puts 'No warnings!'