blob: a53ef3f2c7ada71d9df2efe4c0f1fb77ca26bbd1 [file] [log] [blame]
#!/bin/bash
# Provide a unified interface for the different logging
# utilities CI providers offer. If unavailable, provide
# a compatible fallback (e.g. bare `echo xxxxxx`).
function startgroup {
# Start a foldable group of log lines
# Pass a single argument, quoted
case ${CI:-} in
azure )
echo "##[group]$1";;
travis )
echo "$1"
echo -en 'travis_fold:start:'"${1// /}"'\\r';;
* )
echo "$1";;
esac
}
function endgroup {
# End a foldable group of log lines
# Pass a single argument, quoted
case ${CI:-} in
azure )
echo "##[endgroup]";;
travis )
echo -en 'travis_fold:end:'"${1// /}"'\\r';;
esac
}