Skip to content

Commit 96130aa

Browse files
authored
Merge pull request #85 from NathanVaughn/feature/azure-pipelines-logging
Add support for Azure Pipelines logging commands
2 parents fef83ce + 9d261ae commit 96130aa

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "vscode-task-runner"
3-
version = "1.3.4"
3+
version = "1.3.5"
44
description = "Task runner for VS Code tasks.json"
55
readme = "README.md"
66
authors = [{ name = "Nathan Vaughn", email = "[email protected]" }]

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vscode_task_runner/printer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import colorama
66

77
IS_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"
8+
IS_AZURE_PIPELINES = os.getenv("TF_BUILD") == "true"
89

910

1011
def _print_flush(msg: str) -> None:
@@ -35,6 +36,8 @@ def error(msg: str) -> None:
3536
"""
3637
if IS_GITHUB_ACTIONS:
3738
_print_flush(f"::error::{msg}")
39+
elif IS_AZURE_PIPELINES:
40+
_print_flush(f"##vso[task.logissue type=error]{msg}")
3841
else:
3942
_print_flush(f"{red(msg)}")
4043

@@ -66,6 +69,8 @@ def start_group(name: str) -> None:
6669
"""
6770
if IS_GITHUB_ACTIONS:
6871
_print_flush(f"::group::{name}")
72+
elif IS_AZURE_PIPELINES:
73+
_print_flush(f"##[group]{name}")
6974

7075

7176
def end_group() -> None:
@@ -74,6 +79,8 @@ def end_group() -> None:
7479
"""
7580
if IS_GITHUB_ACTIONS:
7681
_print_flush("::endgroup::")
82+
elif IS_AZURE_PIPELINES:
83+
_print_flush("##[endgroup]")
7784

7885

7986
@contextmanager

0 commit comments

Comments
 (0)