aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2021-07-28 21:15:10 +0200
committerGitHub <noreply@github.com>2021-07-28 12:15:10 -0700
commite5fdfd3d36cfb8436bd66151b2617c00e6e973ec (patch)
tree0451984a345c6473ba25cf4feec4b243f888b461
parent0dd96bb467f90090769df41d11ceec549e2daf78 (diff)
downloadvcpkg-e5fdfd3d36cfb8436bd66151b2617c00e6e973ec.tar.gz
vcpkg-e5fdfd3d36cfb8436bd66151b2617c00e6e973ec.zip
Add AZP logging markup for versioning errors (#19104)
-rw-r--r--scripts/azure-pipelines/windows/azure-pipelines.yml30
1 files changed, 29 insertions, 1 deletions
diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml
index ed5a0a405..9b52378b5 100644
--- a/scripts/azure-pipelines/windows/azure-pipelines.yml
+++ b/scripts/azure-pipelines/windows/azure-pipelines.yml
@@ -47,7 +47,35 @@ jobs:
inputs:
targetType: inline
script: |
- ./vcpkg.exe --feature-flags=versions x-ci-verify-versions --verbose
+ ./vcpkg.exe --feature-flags=versions x-ci-verify-versions --verbose |
+ ForEach-Object -Begin {
+ $long_error = ''
+ } -Process {
+ if ($long_error -ne '' -and $_ -match '^$|^ ') {
+ # Extend multi-line message
+ $long_error = -join($long_error, "%0D%0A", $_ -replace '^ ','' `
+ -replace '(git add) [^ ]*\\ports\\([^ ]*)', '$1 ports/$2' )
+ } else {
+ if ($long_error -ne '') {
+ # Flush multi-line message
+ $long_error
+ $long_error = ''
+ }
+ if ($_ -match '^Error: ') {
+ # Start multi-line message
+ $long_error = $_ -replace '^Error: ', '##vso[task.logissue type=error]' `
+ -replace '(^##vso[^\]]*)](.*) [^ ]*\\versions\\(.-)\\(.*.json)(.*)', '$1;sourcepath=versions/$3/$4;linenumber=2]$2 version/$3/$4$5'
+ } else {
+ # Normal line
+ $_
+ }
+ }
+ } -End {
+ if ($long_error -ne '') {
+ # Flush multi-line message
+ $long_error
+ }
+ }
pwsh: true
- task: PowerShell@2
displayName: 'Report on Disk Space After Build'