summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authoralaviss <leorize+oss@disroot.org>2020-06-12 03:06:29 -0500
committerGitHub <noreply@github.com>2020-06-12 10:06:29 +0200
commit67d34366dc442cd655c78ce41a3fa50491736eb6 (patch)
tree139c5324337b9d5a0ade4e6cf18c34576140cb95 /tools
parentc83a22b76e22d3cae0e0e6e4b9358ed9bd31ecb5 (diff)
downloadNim-67d34366dc442cd655c78ce41a3fa50491736eb6.tar.gz
tools/kochdocs: add log folding supports for more CI services (#14643)
Added log folding for:
- Github Actions
- Azure Pipelines
Diffstat (limited to 'tools')
-rw-r--r--tools/kochdocs.nim10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim
index 4f39463e1..eacfb45ca 100644
--- a/tools/kochdocs.nim
+++ b/tools/kochdocs.nim
@@ -49,14 +49,22 @@ proc exec*(cmd: string, errorcode: int = QuitFailure, additionalPath = "") =
 template inFold*(desc, body) =
   if existsEnv("TRAVIS"):
     echo "travis_fold:start:" & desc.replace(" ", "_")
+  elif existsEnv("GITHUB_ACTIONS"):
+    echo "::group::" & desc
+  elif existsEnv("TF_BUILD"):
+    echo "##[group]" & desc
 
   body
 
   if existsEnv("TRAVIS"):
     echo "travis_fold:end:" & desc.replace(" ", "_")
+  elif existsEnv("GITHUB_ACTIONS"):
+    echo "::endgroup::"
+  elif existsEnv("TF_BUILD"):
+    echo "##[endgroup]"
 
 proc execFold*(desc, cmd: string, errorcode: int = QuitFailure, additionalPath = "") =
-  ## Execute shell command. Add log folding on Travis CI.
+  ## Execute shell command. Add log folding for various CI services.
   # https://github.com/travis-ci/travis-ci/issues/2285#issuecomment-42724719
   inFold(desc):
     exec(cmd, errorcode, additionalPath)