File tree 2 files changed +42
-1
lines changed
2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ $EngScriptsDir = Join-Path $EngDir "scripts"
8
8
. (Join-Path $EngCommonScriptsDir SemVer.ps1)
9
9
. (Join-Path $EngCommonScriptsDir ChangeLog- Operations.ps1)
10
10
. (Join-Path $EngCommonScriptsDir Package- Properties.ps1)
11
+ . (Join-Path $EngCommonScriptsDir logging.ps1)
11
12
12
13
# Setting expected from common languages settings
13
14
$Language = " Unknown"
@@ -20,7 +21,7 @@ $EngScriptsLanguageSettings = Join-path $EngScriptsDir "Language-Settings.ps1"
20
21
if (Test-Path $EngScriptsLanguageSettings ) {
21
22
. $EngScriptsLanguageSettings
22
23
}
23
- If ( $LanguageShort -eq $null )
24
+ if ( -not $LanguageShort )
24
25
{
25
26
$LangaugeShort = $Language
26
27
}
Original file line number Diff line number Diff line change
1
+ if (-not $isDevOpsRun )
2
+ {
3
+ $isDevOpsRun = ($null -ne $env: SYSTEM_TEAMPROJECTID )
4
+ }
5
+
6
+ function LogWarning
7
+ {
8
+ if ($isDevOpsRun )
9
+ {
10
+ Write-Host " ##vso[task.LogIssue type=warning;]$args "
11
+ }
12
+ else
13
+ {
14
+ Write-Warning " $args "
15
+ }
16
+ }
17
+
18
+ function LogError
19
+ {
20
+ if ($isDevOpsRun )
21
+ {
22
+ Write-Host " ##vso[task.LogIssue type=error;]$args "
23
+ }
24
+ else
25
+ {
26
+ Write-Error " $args "
27
+ }
28
+ }
29
+
30
+ function LogDebug
31
+ {
32
+ if ($isDevOpsRun )
33
+ {
34
+ Write-Host " ##vso[task.LogIssue type=debug;]$args "
35
+ }
36
+ else
37
+ {
38
+ Write-Debug " $args "
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments