Add missing entry to Version.Details.xml (#7643)
Changes: * add entry for Mono.WebAssembly.Interop to Version.Details.xml * Update code check to ensure all veriables in the 'automated' section are accounted for in Version.Details.xml
This commit is contained in:
parent
191fb03de7
commit
394ef0ab93
|
|
@ -277,6 +277,10 @@
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>61070026dca7117d439de0443cfbbb0fb7172c65</Sha>
|
<Sha>61070026dca7117d439de0443cfbbb0fb7172c65</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
|
<Dependency Name="Mono.WebAssembly.Interop" Version="3.0.0-preview.19105.4">
|
||||||
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
|
<Sha>0000</Sha>
|
||||||
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Bcl.Json.Sources" Version="4.6.0-preview.19106.2">
|
<Dependency Name="Microsoft.Bcl.Json.Sources" Version="4.6.0-preview.19106.2">
|
||||||
<Uri>https://github.com/dotnet/corefx</Uri>
|
<Uri>https://github.com/dotnet/corefx</Uri>
|
||||||
<Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
|
<Sha>c38c10d28e223aeea2f363a6ef0bf4a63d00a776</Sha>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,19 @@ $repoRoot = Resolve-Path "$PSScriptRoot/../.."
|
||||||
|
|
||||||
[string[]] $errors = @()
|
[string[]] $errors = @()
|
||||||
|
|
||||||
function LogError([string]$message) {
|
function LogError {
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory = $true, Position = 0)]
|
||||||
|
[string]$message,
|
||||||
|
[string]$FilePath
|
||||||
|
)
|
||||||
|
if ($env:TF_BUILD) {
|
||||||
|
$prefix = "##vso[task.logissue type=error"
|
||||||
|
if ($FilePath) {
|
||||||
|
$prefix = "${prefix};sourcepath=$FilePath"
|
||||||
|
}
|
||||||
|
Write-Host "${prefix}]${message}"
|
||||||
|
}
|
||||||
Write-Host -f Red "error: $message"
|
Write-Host -f Red "error: $message"
|
||||||
$script:errors += $message
|
$script:errors += $message
|
||||||
}
|
}
|
||||||
|
|
@ -26,13 +38,19 @@ try {
|
||||||
#
|
#
|
||||||
|
|
||||||
if ($ci) {
|
if ($ci) {
|
||||||
& $repoRoot/build.ps1 -ci /t:InstallDotNet
|
& $repoRoot/build.ps1 -ci -norestore /t:InstallDotNet
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Checking that Versions.props and Version.Details.xml match"
|
Write-Host "Checking that Versions.props and Version.Details.xml match"
|
||||||
[xml] $versionProps = Get-Content "$repoRoot/eng/Versions.props"
|
[xml] $versionProps = Get-Content "$repoRoot/eng/Versions.props"
|
||||||
[xml] $versionDetails = Get-Content "$repoRoot/eng/Version.Details.xml"
|
[xml] $versionDetails = Get-Content "$repoRoot/eng/Version.Details.xml"
|
||||||
foreach ($dep in $versionDetails.SelectNodes('//ProductDependencies/Dependency')) {
|
|
||||||
|
$versionVars = New-Object 'System.Collections.Generic.HashSet[string]'
|
||||||
|
foreach ($vars in $versionProps.SelectNodes("//PropertyGroup[`@Label=`"Automated`"]/*")) {
|
||||||
|
$versionVars.Add($vars.Name) | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($dep in $versionDetails.SelectNodes('//Dependency')) {
|
||||||
Write-Verbose "Found $dep"
|
Write-Verbose "Found $dep"
|
||||||
$varName = $dep.Name -replace '\.',''
|
$varName = $dep.Name -replace '\.',''
|
||||||
$varName = $varName -replace '\-',''
|
$varName = $varName -replace '\-',''
|
||||||
|
|
@ -43,14 +61,24 @@ try {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$versionVars.Remove($varName) | Out-Null
|
||||||
|
|
||||||
$expectedVersion = $dep.Version
|
$expectedVersion = $dep.Version
|
||||||
$actualVersion = $versionVar.InnerText
|
$actualVersion = $versionVar.InnerText
|
||||||
|
|
||||||
if ($expectedVersion -ne $actualVersion) {
|
if ($expectedVersion -ne $actualVersion) {
|
||||||
LogError "Version variable '$varName' does not match the value in Version.Details.xml. Expected '$expectedVersion', actual '$actualVersion'"
|
LogError `
|
||||||
|
"Version variable '$varName' does not match the value in Version.Details.xml. Expected '$expectedVersion', actual '$actualVersion'" `
|
||||||
|
-filepath "$repoRoot\eng\Versions.props"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($unexpectedVar in $versionVars) {
|
||||||
|
LogError `
|
||||||
|
"Version variable '$unexpectedVar' does not have a matching entry in Version.Details.xml. See https://github.com/aspnet/AspNetCore/blob/master/docs/ReferenceResolution.md for instructions on how to add a new dependency." `
|
||||||
|
-filepath "$repoRoot\eng\Versions.props"
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host "Checking that solutions are up to date"
|
Write-Host "Checking that solutions are up to date"
|
||||||
|
|
||||||
Get-ChildItem "$repoRoot/*.sln" -Recurse `
|
Get-ChildItem "$repoRoot/*.sln" -Recurse `
|
||||||
|
|
@ -92,12 +120,14 @@ try {
|
||||||
& $dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/"
|
& $dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "git diff"
|
Write-Host "Run git diff to check for pending changes"
|
||||||
& git diff --ignore-space-at-eol --exit-code
|
$changedFiles = git --no-pager diff --ignore-space-at-eol --name-only
|
||||||
if ($LastExitCode -ne 0) {
|
if ($changedFiles) {
|
||||||
$status = git status -s | Out-String
|
foreach ($file in $changedFiles) {
|
||||||
$status = $status -replace "`n","`n "
|
$filePath = Resolve-Path "${repoRoot}/${file}"
|
||||||
LogError "Generated code is not up to date."
|
LogError "Generated code is not up to date in $file." -filepath $filePath
|
||||||
|
& git --no-pager diff --ignore-space-at-eol $filePath
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue