Version bump and some minor changes (#652)

* Bump version
* Rename msbuild dir to GeneratorSdk,
* Simplify pipeline yaml
* Make sure VSINSTALLDIR is set
This commit is contained in:
Steve Otteson 2021-09-14 16:15:38 -07:00 коммит произвёл GitHub
Родитель 3ab34ff41b
Коммит dd8c746292
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
37 изменённых файлов: 33 добавлений и 40 удалений

2
.gitignore поставляемый
Просмотреть файл

@ -365,5 +365,5 @@ MigrationBackup/
/generation/emitter/functionPointerFixups.generated.rsp
/generation/scraper/functionPointerFixups.generated.rsp
/generation/emitter/enumsMakeFlags.generated.rsp
/sources/msbuild/sdk/sdk.stamped.props
/sources/GeneratorSdk/sdk/sdk.stamped.props
/tests/SourceToWinmd/source/generated/autotypes.cs

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<ProjectReference Include="..\sources\msbuild\MetadataTasks\MetadataTasks.csproj"/>
<ProjectReference Include="..\sources\GeneratorSdk\MetadataTasks\MetadataTasks.csproj"/>
<ProjectReference Include="..\sources\ConstantsScraper\ConstantsScraper.csproj"/>
<ProjectReference Include="..\sources\ClangSharpSourceToWinmd\ClangSharpSourceToWinmd.csproj"/>
<ProjectReference Include="..\sources\WinmdUtils\WinmdUtils.csproj"/>

Просмотреть файл

@ -56,9 +56,9 @@ if (!$ExcludePackages)
.\scripts\UpdateGlobalJsonWinmdGeneratorVersion.ps1
dotnet pack .\sources\msbuild\samples\diasdk -c Release
dotnet pack .\sources\GeneratorSdk\samples\diasdk -c Release
dotnet build .\sources\msbuild\samples -c Release
dotnet build .\sources\GeneratorSdk\samples -c Release
}
if ($arch -eq "crossarch")

Просмотреть файл

@ -233,7 +233,7 @@ jobs:
condition: and(succeeded(), eq(variables['SignFiles'], 'true'), ne(variables['Build.Reason'], 'PullRequest'))
- task: EsrpCodeSigning@1
displayName: Authenticode sign net5.0 binaries in MSBuild SDK package
displayName: Authenticode sign net5.0 binaries in Generator SDK package
inputs:
ConnectedServiceName: 'Undocked RegFree Signing Connection'
FolderPath: '$(Build.SourcesDirectory)\bin\$(BuildConfiguration)\net5.0'
@ -274,8 +274,9 @@ jobs:
MaxConcurrency: '50'
MaxRetryAttempts: '2'
condition: and(succeeded(), eq(variables['SignFiles'], 'true'), ne(variables['Build.Reason'], 'PullRequest'))
- task: EsrpCodeSigning@1
displayName: Authenticode sign netstandard2.0 binaries in MSBuild SDK package
displayName: Authenticode sign netstandard2.0 binaries in Generator SDK package
inputs:
ConnectedServiceName: 'Undocked RegFree Signing Connection'
FolderPath: '$(Build.SourcesDirectory)\bin\$(BuildConfiguration)\netstandard2.0'
@ -317,39 +318,20 @@ jobs:
MaxRetryAttempts: '2'
condition: and(succeeded(), eq(variables['SignFiles'], 'true'), ne(variables['Build.Reason'], 'PullRequest'))
- task: PowerShell@2
- script: dotnet pack $(Build.SourcesDirectory)\sources\packages.proj -c Release
displayName: Pack NuGet packages
inputs:
targetType: inline
script: |
dotnet pack $(Build.SourcesDirectory)\sources\packages.proj -c Release
errorActionPreference: 'continue'
pwsh: true
- task: PowerShell@2
displayName: Update global.json with MSBuildSDK version
displayName: Update global.json with Generator SDK version
inputs:
targetType: inline
script: |
$(Build.SourcesDirectory)\scripts\UpdateGlobalJsonWinmdGeneratorVersion.ps1
filePath: $(Build.SourcesDirectory)\scripts\UpdateGlobalJsonWinmdGeneratorVersion.ps1
pwsh: true
- task: PowerShell@2
- script: dotnet pack $(Build.SourcesDirectory)\sources\GeneratorSdk\samples\DiaSdk -c Release
displayName: Pack Dia SDK package
inputs:
targetType: inline
script: |
dotnet pack $(Build.SourcesDirectory)\sources\msbuild\samples\DiaSdk -c Release
errorActionPreference: 'continue'
pwsh: true
- task: PowerShell@2
displayName: Test MSBuildSDK with samples
inputs:
targetType: inline
script: |
dotnet build $(Build.SourcesDirectory)\sources\msbuild\samples -c Release
pwsh: true
- script: dotnet build $(Build.SourcesDirectory)\sources\GeneratorSdk\samples -c Release
displayName: Test Generator SDK with samples
- task: EsrpCodeSigning@1
displayName: 'Sign nuget packages'

Просмотреть файл

@ -7,6 +7,6 @@
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.0.4",
"Microsoft.Build.Traversal": "3.0.23",
"Microsoft.Windows.WinmdGenerator": "0.2.118-preview"
"Microsoft.Windows.WinmdGenerator": "0.3.0-preview-g3ab34ff41b"
}
}

Просмотреть файл

@ -68,6 +68,8 @@ function Install-BuildTools
Install-DotNetTool -Name nbgv
& dotnet build "$rootDir\buildtools" -c Release
Update-VsInstallDir
}
function Replace-Text
@ -181,6 +183,15 @@ function Get-VcDirPath
return $null
}
function Update-VsInstallDir
{
if (!$env:VSINSTALLDIR)
{
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$env:VSINSTALLDIR = & $vswhere -latest -property installationPath
}
}
function Get-OutputWinmdFileName
{
param ($Arch = 'x64')

Просмотреть файл

@ -1,5 +1,5 @@
$rootDir = [System.IO.Path]::GetFullPath("$PSScriptRoot\..")
$winmdGeneratorSdkDir = Join-Path $rootDir "sources\msbuild"
$winmdGeneratorSdkDir = Join-Path $rootDir "sources\GeneratorSdk"
$globalJson = Join-Path $rootDir "global.json"
$winmdGeneratorSdkVersion = nbgv get-version -v NuGetPackageVersion -p $winmdGeneratorSdkDir
$json = Get-Content $globalJson -raw | ConvertFrom-Json

Просмотреть файл

@ -5,7 +5,7 @@ VisualStudioVersion = 17.0.31629.42
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "msbuild", "msbuild", "{D3E6399F-0983-4742-B07C-874B6ED80E51}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetadataTasks", "msbuild\MetadataTasks\MetadataTasks.csproj", "{5B6F6176-0031-4105-B9FF-B713499D8975}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetadataTasks", "GeneratorSdk\MetadataTasks\MetadataTasks.csproj", "{5B6F6176-0031-4105-B9FF-B713499D8975}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConstantsScraper", "ConstantsScraper\ConstantsScraper.csproj", "{8C0897A4-2BA6-40D5-AF41-130BE109C024}"
EndProject

Просмотреть файл

@ -5,7 +5,7 @@
<version>$version$</version>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<title>.NET Win32 Metadata MSBuild SDK Package</title>
<title>.NET Win32 Metadata Generator SDK Package</title>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<summary>This packages provides a way to scrape C/C++ headers and create a winmd (Windows metadata) file.</summary>
<description>This packages provides a way to scrape C/C++ headers and create a winmd (Windows metadata) file.</description>
@ -19,8 +19,8 @@
<files>
<file src="images\windows.png" target="images"/>
<file src="sources\msbuild\sdk\sdk.stamped.props" target="sdk\sdk.props"/>
<file src="sources\msbuild\sdk\sdk.targets" target="sdk"/>
<file src="sources\GeneratorSdk\sdk\sdk.stamped.props" target="sdk\sdk.props"/>
<file src="sources\GeneratorSdk\sdk\sdk.targets" target="sdk"/>
<file src="tools\dumpbin.exe" target="tools"/>
<file src="tools\link.exe" target="tools"/>

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "0.2-preview",
"version": "0.3-preview",
"assemblyVersion": {
"precision": "revision"
},

Просмотреть файл

@ -5,6 +5,6 @@
<ItemGroup>
<ProjectReference Include="nuget\Microsoft.Windows.SDK.Win32Metadata\Win32MetadataNuget.proj" />
<ProjectReference Include="msbuild\nuget\BuildSdk.proj" />
<ProjectReference Include="GeneratorSdk\nuget\BuildSdk.proj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "10.2-preview",
"version": "10.3-preview",
"assemblyVersion": {
"precision": "revision"
},