Skip to content

Instantly share code, notes, and snippets.

@pj4533
Created May 8, 2018 12:53
Show Gist options
  • Save pj4533/f2b83b00c5ed412be02f67b955ad6cbf to your computer and use it in GitHub Desktop.
Save pj4533/f2b83b00c5ed412be02f67b955ad6cbf to your computer and use it in GitHub Desktop.
Quick script to parse the travis YAML and build
#!/usr/bin/env ruby
require 'travis/yaml'
require 'open3'
content = File.read('.travis.yml')
Travis::Yaml.parse! content do |config|
cmd = "#{config[:script]}"
Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
while line = stdout.gets
print line
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment