scripts: Allow data collection script output to be hidden

Use a clever HTML trick to allow the output of the data collection
script to be hidden / unhidden in the github.com interface.

See the example at the top of
https://github.com/kata-containers/runtime/issues/1347.

Fixes #1386.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2019-03-19 15:29:13 +00:00
parent 4f34a54777
commit 5a271f06ce

View File

@ -672,8 +672,27 @@ read_osbuilder_file()
cat "$file"
}
show_header()
{
cat <<EOT
<details>
<summary>Show <tt>$script_name</tt> details</summary>
<p>
EOT
}
show_footer()
{
cat <<EOT
</p>
</details>
EOT
}
show_details()
{
show_header
show_meta
show_runtime
show_runtime_configs
@ -683,6 +702,8 @@ show_details()
show_log_details
show_container_mgr_details
show_package_versions
show_footer
}
main()