Skip to content

Commit 34a8920

Browse files
committed
Don't use parent hashes when the tool version changes.
1 parent d15d9e4 commit 34a8920

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/azure-pipelines/test-modified-ports.ps1

+4-2
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ $parentHashes = @()
132132
if (($BuildReason -eq 'PullRequest') -and -not $NoParentHashes)
133133
{
134134
$headBaseline = Get-Content "$PSScriptRoot/../ci.baseline.txt" -Raw
135+
$headTool = Get-Content "$PSScriptRoot/../vcpkg-tool-metadata.txt" -Raw
135136

136137
# Prefetch tools for better output
137138
foreach ($tool in @('cmake', 'ninja', 'git')) {
@@ -154,7 +155,8 @@ if (($BuildReason -eq 'PullRequest') -and -not $NoParentHashes)
154155
}
155156

156157
$parentBaseline = Get-Content "$PSScriptRoot/../ci.baseline.txt" -Raw
157-
if ($parentBaseline -eq $headBaseline)
158+
$parentTool = Get-Content "$PSScriptRoot/../vcpkg-tool-metadata.txt" -Raw
159+
if (($parentBaseline -eq $headBaseline) -and ($parentTool -eq $headTool))
158160
{
159161
Write-Host "CI baseline unchanged, determining parent hashes"
160162
$parentHashesFile = Join-Path $ArtifactStagingDirectory 'parent-hashes.json'
@@ -173,7 +175,7 @@ if (($BuildReason -eq 'PullRequest') -and -not $NoParentHashes)
173175
}
174176
else
175177
{
176-
Write-Host "CI baseline was modified, not using parent hashes"
178+
Write-Host "Tool or baseline modified, not using parent hashes"
177179
}
178180

179181
Write-Host "Running CI for HEAD"

0 commit comments

Comments
 (0)