Update dependencies from https://github.com/dotnet/arcade build 20210512.2 (#10872)
[release/5.0.3xx] Update dependencies from dotnet/arcade
This commit is contained in:
parent
09c87f0b54
commit
c3e0fa6d7b
8 changed files with 199 additions and 49 deletions
24
NuGet.config
24
NuGet.config
|
@ -7,27 +7,15 @@
|
|||
<clear />
|
||||
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
||||
<!-- Begin: Package sources from dotnet-aspnetcore -->
|
||||
<add key="darc-int-dotnet-aspnetcore-67acc3d-2" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-aspnetcore-67acc3d3-2/nuget/v3/index.json" />
|
||||
<add key="darc-int-dotnet-aspnetcore-67acc3d-1" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-aspnetcore-67acc3d3-1/nuget/v3/index.json" />
|
||||
<add key="darc-int-dotnet-aspnetcore-67acc3d" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-aspnetcore-67acc3d3/nuget/v3/index.json" />
|
||||
<!-- End: Package sources from dotnet-aspnetcore -->
|
||||
<!-- Begin: Package sources from dotnet-efcore -->
|
||||
<add key="darc-int-dotnet-efcore-f8a6198-2" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-efcore-f8a6198d-2/nuget/v3/index.json" />
|
||||
<add key="darc-int-dotnet-efcore-f8a6198-1" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-efcore-f8a6198d-1/nuget/v3/index.json" />
|
||||
<add key="darc-int-dotnet-efcore-f8a6198" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-efcore-f8a6198d/nuget/v3/index.json" />
|
||||
<!-- End: Package sources from dotnet-efcore -->
|
||||
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
|
||||
<add key="darc-pub-DotNet-msbuild-Trusted-2fd48ab-1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-2fd48ab7-1/nuget/v3/index.json" />
|
||||
<!-- End: Package sources from DotNet-msbuild-Trusted -->
|
||||
<!-- Begin: Package sources from dotnet-runtime -->
|
||||
<add key="darc-int-dotnet-runtime-556582d-4" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-runtime-556582d9-4/nuget/v3/index.json" />
|
||||
<add key="darc-int-dotnet-runtime-556582d-3" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-runtime-556582d9-3/nuget/v3/index.json" />
|
||||
<add key="darc-int-dotnet-runtime-556582d-2" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-runtime-556582d9-2/nuget/v3/index.json" />
|
||||
<!-- End: Package sources from dotnet-runtime -->
|
||||
<!-- Begin: Package sources from dotnet-windowsdesktop -->
|
||||
<add key="darc-int-dotnet-windowsdesktop-f874552-2" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-windowsdesktop-f8745522-2/nuget/v3/index.json" />
|
||||
<add key="darc-int-dotnet-windowsdesktop-f874552-1" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-windowsdesktop-f8745522-1/nuget/v3/index.json" />
|
||||
<add key="darc-int-dotnet-windowsdesktop-f874552" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-windowsdesktop-f8745522/nuget/v3/index.json" />
|
||||
<!-- End: Package sources from dotnet-windowsdesktop -->
|
||||
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
|
||||
<!-- For custom version of arcade -->
|
||||
|
@ -44,23 +32,11 @@
|
|||
<clear />
|
||||
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
||||
<!-- Begin: Package sources from dotnet-aspnetcore -->
|
||||
<add key="darc-int-dotnet-aspnetcore-67acc3d" value="true" />
|
||||
<add key="darc-int-dotnet-aspnetcore-67acc3d-1" value="true" />
|
||||
<add key="darc-int-dotnet-aspnetcore-67acc3d-2" value="true" />
|
||||
<!-- End: Package sources from dotnet-aspnetcore -->
|
||||
<!-- Begin: Package sources from dotnet-efcore -->
|
||||
<add key="darc-int-dotnet-efcore-f8a6198" value="true" />
|
||||
<add key="darc-int-dotnet-efcore-f8a6198-1" value="true" />
|
||||
<add key="darc-int-dotnet-efcore-f8a6198-2" value="true" />
|
||||
<!-- Begin: Package sources from dotnet-runtime -->
|
||||
<!-- Begin: Package sources from dotnet-windowsdesktop -->
|
||||
<add key="darc-int-dotnet-windowsdesktop-f874552" value="true" />
|
||||
<add key="darc-int-dotnet-windowsdesktop-f874552-1" value="true" />
|
||||
<add key="darc-int-dotnet-windowsdesktop-f874552-2" value="true" />
|
||||
<!-- End: Package sources from dotnet-windowsdesktop -->
|
||||
<add key="darc-int-dotnet-runtime-556582d-2" value="true" />
|
||||
<add key="darc-int-dotnet-runtime-556582d-3" value="true" />
|
||||
<add key="darc-int-dotnet-runtime-556582d-4" value="true" />
|
||||
<!-- End: Package sources from dotnet-runtime -->
|
||||
<!-- End: Package sources from dotnet-efcore -->
|
||||
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
|
||||
|
|
|
@ -144,13 +144,13 @@
|
|||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.21160.3">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.21262.2">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>670382be6a978ba401c21c57ba44311199d2682a</Sha>
|
||||
<Sha>dad4f3c62e24b94b1514427674af8ca899cddd5f</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="5.0.0-beta.21160.3">
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="5.0.0-beta.21262.2">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>670382be6a978ba401c21c57ba44311199d2682a</Sha>
|
||||
<Sha>dad4f3c62e24b94b1514427674af8ca899cddd5f</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Private.SourceBuild.ReferencePackages" Version="1.0.0-beta.20217.1">
|
||||
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/arcade -->
|
||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>5.0.0-beta.21160.3</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>5.0.0-beta.21262.2</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/winforms -->
|
||||
|
|
|
@ -158,9 +158,4 @@ if ($dotnet5Source -ne $null) {
|
|||
AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
}
|
||||
|
||||
$dotnetToolsSource = $sources.SelectSingleNode("add[@key='dotnet-tools']")
|
||||
if ($dotnetToolsSource -ne $null) {
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet-tools-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
}
|
||||
|
||||
$doc.Save($filename)
|
||||
|
|
|
@ -129,20 +129,6 @@ if [ "$?" == "0" ]; then
|
|||
PackageSources+=('dotnet5-internal-transport')
|
||||
fi
|
||||
|
||||
# Ensure dotnet-tools-internal is in the packageSources if the public dotnet-tools feed is present
|
||||
grep -i "<add key=\"dotnet-tools\"" $ConfigFile
|
||||
if [ "$?" == "0" ]; then
|
||||
grep -i "<add key=\"dotnet-tools-internal\"" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet-tools-internal to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet-tools-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet-tools-internal')
|
||||
fi
|
||||
|
||||
# I want things split line by line
|
||||
PrevIFS=$IFS
|
||||
IFS=$'\n'
|
||||
|
|
110
eng/common/generate-locproject.ps1
Normal file
110
eng/common/generate-locproject.ps1
Normal file
|
@ -0,0 +1,110 @@
|
|||
Param(
|
||||
[Parameter(Mandatory=$true)][string] $SourcesDirectory, # Directory where source files live; if using a Localize directory it should live in here
|
||||
[string] $LanguageSet = 'VS_Main_Languages', # Language set to be used in the LocProject.json
|
||||
[switch] $UseCheckedInLocProjectJson, # When set, generates a LocProject.json and compares it to one that already exists in the repo; otherwise just generates one
|
||||
[switch] $CreateNeutralXlfs # Creates neutral xlf files. Only set to false when running locally
|
||||
)
|
||||
|
||||
# Generates LocProject.json files for the OneLocBuild task. OneLocBuildTask is described here:
|
||||
# https://ceapex.visualstudio.com/CEINTL/_wiki/wikis/CEINTL.wiki/107/Localization-with-OneLocBuild-Task
|
||||
|
||||
Set-StrictMode -Version 2.0
|
||||
$ErrorActionPreference = "Stop"
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
|
||||
|
||||
$exclusionsFilePath = "$SourcesDirectory\Localize\LocExclusions.json"
|
||||
$exclusions = @{ Exclusions = @() }
|
||||
if (Test-Path -Path $exclusionsFilePath)
|
||||
{
|
||||
$exclusions = Get-Content "$exclusionsFilePath" | ConvertFrom-Json
|
||||
}
|
||||
|
||||
Push-Location "$SourcesDirectory" # push location for Resolve-Path -Relative to work
|
||||
|
||||
# Template files
|
||||
$jsonFiles = @()
|
||||
$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\en\..+\.json" } # .NET templating pattern
|
||||
$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
|
||||
|
||||
$xlfFiles = @()
|
||||
|
||||
$allXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.xlf"
|
||||
$langXlfFiles = @()
|
||||
if ($allXlfFiles) {
|
||||
$null = $allXlfFiles[0].FullName -Match "\.([\w-]+)\.xlf" # matches '[langcode].xlf'
|
||||
$firstLangCode = $Matches.1
|
||||
$langXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.$firstLangCode.xlf"
|
||||
}
|
||||
$langXlfFiles | ForEach-Object {
|
||||
$null = $_.Name -Match "(.+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf'
|
||||
|
||||
$destinationFile = "$($_.Directory.FullName)\$($Matches.1).xlf"
|
||||
$xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
|
||||
}
|
||||
|
||||
$locFiles = $jsonFiles + $xlfFiles
|
||||
|
||||
$locJson = @{
|
||||
Projects = @(
|
||||
@{
|
||||
LanguageSet = $LanguageSet
|
||||
LocItems = @(
|
||||
$locFiles | ForEach-Object {
|
||||
$outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")"
|
||||
$continue = $true
|
||||
foreach ($exclusion in $exclusions.Exclusions) {
|
||||
if ($outputPath.Contains($exclusion))
|
||||
{
|
||||
$continue = $false
|
||||
}
|
||||
}
|
||||
$sourceFile = ($_.FullName | Resolve-Path -Relative)
|
||||
if (!$CreateNeutralXlfs -and $_.Extension -eq '.xlf') {
|
||||
Remove-Item -Path $sourceFile
|
||||
}
|
||||
if ($continue)
|
||||
{
|
||||
if ($_.Directory.Name -eq 'en' -and $_.Extension -eq '.json') {
|
||||
return @{
|
||||
SourceFile = $sourceFile
|
||||
CopyOption = "LangIDOnPath"
|
||||
OutputPath = "$($_.Directory.Parent.FullName | Resolve-Path -Relative)\"
|
||||
}
|
||||
}
|
||||
else {
|
||||
return @{
|
||||
SourceFile = $sourceFile
|
||||
CopyOption = "LangIDOnName"
|
||||
OutputPath = $outputPath
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
$json = ConvertTo-Json $locJson -Depth 5
|
||||
Write-Host "LocProject.json generated:`n`n$json`n`n"
|
||||
Pop-Location
|
||||
|
||||
if (!$UseCheckedInLocProjectJson) {
|
||||
New-Item "$SourcesDirectory\Localize\LocProject.json" -Force # Need this to make sure the Localize directory is created
|
||||
Set-Content "$SourcesDirectory\Localize\LocProject.json" $json
|
||||
}
|
||||
else {
|
||||
New-Item "$SourcesDirectory\Localize\LocProject-generated.json" -Force # Need this to make sure the Localize directory is created
|
||||
Set-Content "$SourcesDirectory\Localize\LocProject-generated.json" $json
|
||||
|
||||
if ((Get-FileHash "$SourcesDirectory\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\Localize\LocProject.json").Hash) {
|
||||
Write-PipelineTelemetryError -Category "OneLocBuild" -Message "Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them."
|
||||
|
||||
exit 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Generated LocProject.json and current LocProject.json are identical."
|
||||
}
|
||||
}
|
83
eng/common/templates/job/onelocbuild.yml
Normal file
83
eng/common/templates/job/onelocbuild.yml
Normal file
|
@ -0,0 +1,83 @@
|
|||
parameters:
|
||||
# Optional: dependencies of the job
|
||||
dependsOn: ''
|
||||
|
||||
# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
|
||||
CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
|
||||
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)
|
||||
|
||||
SourcesDirectory: $(Build.SourcesDirectory)
|
||||
CreatePr: true
|
||||
AutoCompletePr: false
|
||||
UseCheckedInLocProjectJson: false
|
||||
LanguageSet: VS_Main_Languages
|
||||
LclSource: lclFilesInRepo
|
||||
LclPackageId: ''
|
||||
RepoType: gitHub
|
||||
condition: ''
|
||||
|
||||
jobs:
|
||||
- job: OneLocBuild
|
||||
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
|
||||
displayName: OneLocBuild
|
||||
|
||||
pool: ${{ parameters.pool }}
|
||||
|
||||
variables:
|
||||
- group: OneLocBuildVariables # Contains the CeapexPat and GithubPat
|
||||
- name: _GenerateLocProjectArguments
|
||||
value: -SourcesDirectory ${{ parameters.SourcesDirectory }}
|
||||
-LanguageSet "${{ parameters.LanguageSet }}"
|
||||
-CreateNeutralXlfs
|
||||
- ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}:
|
||||
- name: _GenerateLocProjectArguments
|
||||
value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson
|
||||
|
||||
|
||||
steps:
|
||||
- task: Powershell@2
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1
|
||||
arguments: $(_GenerateLocProjectArguments)
|
||||
displayName: Generate LocProject.json
|
||||
condition: ${{ parameters.condition }}
|
||||
|
||||
- task: OneLocBuild@2
|
||||
displayName: OneLocBuild
|
||||
env:
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
inputs:
|
||||
locProj: Localize/LocProject.json
|
||||
outDir: $(Build.ArtifactStagingDirectory)
|
||||
lclSource: ${{ parameters.LclSource }}
|
||||
lclPackageId: ${{ parameters.LclPackageId }}
|
||||
isCreatePrSelected: ${{ parameters.CreatePr }}
|
||||
${{ if eq(parameters.CreatePr, true) }}:
|
||||
isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }}
|
||||
packageSourceAuth: patAuth
|
||||
patVariable: ${{ parameters.CeapexPat }}
|
||||
${{ if eq(parameters.RepoType, 'gitHub') }}:
|
||||
repoType: ${{ parameters.RepoType }}
|
||||
gitHubPatVariable: "${{ parameters.GithubPat }}"
|
||||
condition: ${{ parameters.condition }}
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Localization Files
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/loc'
|
||||
PublishLocation: Container
|
||||
ArtifactName: Loc
|
||||
condition: ${{ parameters.condition }}
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish LocProject.json
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/Localize/'
|
||||
PublishLocation: Container
|
||||
ArtifactName: Loc
|
||||
condition: ${{ parameters.condition }}
|
|
@ -8,6 +8,6 @@
|
|||
}
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.21160.3"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.21262.2"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue