From b0d9a38b898e4d4bcc4408f8a4869484dfb2da9e Mon Sep 17 00:00:00 2001 From: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Date: Sat, 13 Apr 2024 01:31:23 -0700 Subject: [PATCH] Fix REF replacement in vcpkg daily runs 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`. --- eng/scripts/Initialize-VcpkgRelease.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/scripts/Initialize-VcpkgRelease.ps1 b/eng/scripts/Initialize-VcpkgRelease.ps1 index fb995591dc..1786434906 100644 --- a/eng/scripts/Initialize-VcpkgRelease.ps1 +++ b/eng/scripts/Initialize-VcpkgRelease.ps1 @@ -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