Fix REF replacement in vcpkg daily runs (#5529)

I could've fixed the quote characters alone, but I think it is better to just capture everything, this way it is compatible with both `REF azure-core_1234` and `REF "azure-core_1234"`, as well as `REF foo`.
This commit is contained in:
Anton Kolesnyk 2024-04-15 10:53:58 -07:00 committed by GitHub
parent 067d6acb3b
commit 6ded663ff6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,7 +69,7 @@ $newContent = $portFileContent -replace '(SHA512\s+)0', "`${1}$sha512"
if ($DailyReleaseRef) {
Write-Verbose "Overriding REF with test release ref: $DailyReleaseRef"
$newContent = $newContent -replace '(?m)^(\s+)REF \"azure.*\"$', "`${1}REF $DailyReleaseRef"
$newContent = $newContent -replace '(?m)^(\s+)REF .+$', "`${1}REF $DailyReleaseRef"
}
$newContent | Set-Content $portfileLocation -NoNewLine