1
1
mirror of https://github.com/github/semantic.git synced 2024-11-23 08:27:56 +03:00
semantic/generate_hie_yaml.rb

18 lines
362 B
Ruby
Executable File

#!/usr/bin/env ruby
require 'yaml'
components = []
Dir.glob("./semantic*").each do |dir|
components << {'path' => dir + '/src', 'component' => "lib:" + dir[2..]}
end
Dir.glob("./semantic*/test").each do |dir|
components << {'path' => dir, 'component' => "test:" + dir[2..-6]}
end
result = {'cradle' => { 'cabal' => components }}
puts YAML.dump(result)