1#!/bin/bash 2 3# Provide a unified interface for the different logging 4# utilities CI providers offer. If unavailable, provide 5# a compatible fallback (e.g. bare `echo xxxxxx`). 6 7function startgroup { 8 # Start a foldable group of log lines 9 # Pass a single argument, quoted 10 case ${CI:-} in 11 azure ) 12 echo "##[group]$1";; 13 travis ) 14 echo "$1" 15 echo -en 'travis_fold:start:'"${1// /}"'\\r';; 16 * ) 17 echo "$1";; 18 esac 19} 20 21function endgroup { 22 # End a foldable group of log lines 23 # Pass a single argument, quoted 24 case ${CI:-} in 25 azure ) 26 echo "##[endgroup]";; 27 travis ) 28 echo -en 'travis_fold:end:'"${1// /}"'\\r';; 29 esac 30} 31