Sync eng/common directory with azure-sdk-tools repository for Tools PR 974 (#620)
This commit is contained in:
parent
34944552ad
commit
0f262cd0e0
@ -8,6 +8,7 @@ $EngScriptsDir = Join-Path $EngDir "scripts"
|
||||
. (Join-Path $EngCommonScriptsDir SemVer.ps1)
|
||||
. (Join-Path $EngCommonScriptsDir ChangeLog-Operations.ps1)
|
||||
. (Join-Path $EngCommonScriptsDir Package-Properties.ps1)
|
||||
. (Join-Path $EngCommonScriptsDir logging.ps1)
|
||||
|
||||
# Setting expected from common languages settings
|
||||
$Language = "Unknown"
|
||||
@ -20,7 +21,7 @@ $EngScriptsLanguageSettings = Join-path $EngScriptsDir "Language-Settings.ps1"
|
||||
if (Test-Path $EngScriptsLanguageSettings) {
|
||||
. $EngScriptsLanguageSettings
|
||||
}
|
||||
If ($LanguageShort -eq $null)
|
||||
if (-not $LanguageShort)
|
||||
{
|
||||
$LangaugeShort = $Language
|
||||
}
|
||||
|
||||
40
eng/common/scripts/logging.ps1
Normal file
40
eng/common/scripts/logging.ps1
Normal file
@ -0,0 +1,40 @@
|
||||
if (-not $isDevOpsRun)
|
||||
{
|
||||
$isDevOpsRun = ($null -ne $env:SYSTEM_TEAMPROJECTID)
|
||||
}
|
||||
|
||||
function LogWarning
|
||||
{
|
||||
if ($isDevOpsRun)
|
||||
{
|
||||
Write-Host "##vso[task.LogIssue type=warning;]$args"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Warning "$args"
|
||||
}
|
||||
}
|
||||
|
||||
function LogError
|
||||
{
|
||||
if ($isDevOpsRun)
|
||||
{
|
||||
Write-Host "##vso[task.LogIssue type=error;]$args"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Error "$args"
|
||||
}
|
||||
}
|
||||
|
||||
function LogDebug
|
||||
{
|
||||
if ($isDevOpsRun)
|
||||
{
|
||||
Write-Host "##vso[task.LogIssue type=debug;]$args"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Debug "$args"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user