summaryrefslogtreecommitdiffstats
path: root/src/arrow/dev/tasks/conda-recipes/.scripts/logging_utils.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/arrow/dev/tasks/conda-recipes/.scripts/logging_utils.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/arrow/dev/tasks/conda-recipes/.scripts/logging_utils.sh b/src/arrow/dev/tasks/conda-recipes/.scripts/logging_utils.sh
new file mode 100644
index 000000000..a53ef3f2c
--- /dev/null
+++ b/src/arrow/dev/tasks/conda-recipes/.scripts/logging_utils.sh
@@ -0,0 +1,30 @@
+#!/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
+}