1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Write yaml and json under destdir and print to stdout

This commit is contained in:
Kazuhiro NISHIYAMA 2019-10-07 19:33:33 +09:00
parent 96753e8475
commit 3374e1450c
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -628,8 +628,16 @@ revisions.collect {|rev| package(vcs, rev, destdir, tmp)}.flatten.each do |name|
end
end
File.write('info.yml', info.values.to_yaml)
File.write('info.json', info.values.to_json)
yaml = info.values.to_yaml
json = info.values.to_json
puts "#{$colorize.pass('JSON:')}"
puts yaml
puts "#{$colorize.pass('YAML:')}"
puts json
infodir = Pathname(destdir) + 'info'
infodir.mkpath
(infodir+'info.yml').write(yaml)
(infodir+'info.json').write(json)
exit false if !success