try build and pack with nuspec

This commit is contained in:
Rui Marinho 2021-05-28 18:39:12 +01:00
Родитель 7dbb7a34bb
Коммит 7d2af2775d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 87D2837A9AEED71E
4 изменённых файлов: 69 добавлений и 61 удалений

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

@ -98,14 +98,25 @@ stages:
displayName: update vs
- script: dotnet cake --configuration=${{ BuildCondition }}
displayName: pack nugets
displayName: build net6 solutions
- task: NuGetCommand@2
displayName: 'Pack nupkg'
inputs:
command: 'pack'
packagesToPack: |
build/Microsoft.Maui.Graphics.nuspec
build/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.nuspec
packDestination: '$(Build.ArtifactStagingDirectory)/${{ BuildCondition }}'
configuration: ${{ BuildCondition }}
basePath: '$(System.DefaultWorkingDirectory)'
versioningScheme : 'byEnvVar'
versionEnvVar: 'BUILD_BUILDNUMBER'
- task: CopyFiles@2
displayName: 'Copy SignList.xml and Packages'
inputs:
Contents: |
**/Microsoft.Maui.*.nupkg
**/Microsoft.Maui.*.snupkg
**/SignList.xml
TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ BuildCondition }}'
flattenFolders: true

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

@ -1,49 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30523.141
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{9E4B772B-D417-4147-B8B1-FD9E3B0B4EC5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2BAF0999-6876-4091-9FCE-CBC56D80BEC3}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{8A2197EB-6E30-495D-9DE9-2E40032FB2E9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Graphics-net6", "..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics-net6.csproj", "{8E78C89F-7AE7-4342-BFFE-227873D89397}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Graphics.Win2D.WinUI.Desktop-net6", "..\src\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop-net6.csproj", "{00145282-A205-4230-8AC8-161E59E5C00A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
AppStore|Any CPU = AppStore|Any CPU
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8E78C89F-7AE7-4342-BFFE-227873D89397}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{8E78C89F-7AE7-4342-BFFE-227873D89397}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{8E78C89F-7AE7-4342-BFFE-227873D89397}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E78C89F-7AE7-4342-BFFE-227873D89397}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E78C89F-7AE7-4342-BFFE-227873D89397}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E78C89F-7AE7-4342-BFFE-227873D89397}.Release|Any CPU.Build.0 = Release|Any CPU
{00145282-A205-4230-8AC8-161E59E5C00A}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{00145282-A205-4230-8AC8-161E59E5C00A}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{00145282-A205-4230-8AC8-161E59E5C00A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00145282-A205-4230-8AC8-161E59E5C00A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00145282-A205-4230-8AC8-161E59E5C00A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00145282-A205-4230-8AC8-161E59E5C00A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8E78C89F-7AE7-4342-BFFE-227873D89397} = {9E4B772B-D417-4147-B8B1-FD9E3B0B4EC5}
{00145282-A205-4230-8AC8-161E59E5C00A} = {9E4B772B-D417-4147-B8B1-FD9E3B0B4EC5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B07E734-6AE2-4A12-AD60-C072F3695854}
EndGlobalSection
EndGlobal

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

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Microsoft.Maui.Graphics.Win2D.WinUI.Desktop</id>
<version>$version$</version>
<title>Microsoft.Maui.Graphics.Win2D.WinUI</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>Microsoft.Maui.Graphics for WinUI powered by Win2D</description>
<summary>Microsoft.Maui.Graphics for WinUI powered by Win2D</summary>
<projectUrl>https://github.com/dotnet/Microsoft.Maui.Graphics</projectUrl>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<repository url="https://github.com/dotnet/Microsoft.Maui.Graphics.git" />
<license type="expression">MIT</license>
<language>C#</language>
<dependencies>
<group>
<dependency id="Microsoft.Maui.Graphics" version="$version$" exclude="Build,Analyzers" />
<dependency id="Microsoft.Graphics.Win2D" version="0.5.0.13" exclude="Build,Analyzers" />
<dependency id="Microsoft.ProjectReunion" version="0.5.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
<files>
<file src="src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/bin/$configuration$/net5.0-windows10.0.19041.0/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll" target="lib/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll"/>
<file src="src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/bin/$configuration$/net5.0-windows10.0.19041.0/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.pdb" target="lib/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.pdb"/>
<file src="src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/bin/$configuration$/net5.0-windows10.0.19041.0/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.pri" target="lib/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.pri"/>
<file src="src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/bin/$configuration$/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll" target="lib/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll"/>
<file src="src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/bin/$configuration$/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.pdb" target="lib/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.pdb"/>
<file src="src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/bin/$configuration$/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.pri" target="lib/net6.0-windows10.0.18362/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.pri"/>
</files>
</package>

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

@ -14,7 +14,8 @@ if($IsWindows)
}
$artifacts = Join-Path $PSScriptRoot ../artifacts
$sln = Join-Path $PSScriptRoot ../Microsoft.Maui.Graphics-net6.sln
$slnnet6 = Join-Path $PSScriptRoot ../Microsoft.Maui.Graphics-net6.sln
$sln = Join-Path $PSScriptRoot ../build/Build.Microsoft.Maui.Graphics.Windows.sln
# Bootstrap ./bin/dotnet/
$csproj = Join-Path $PSScriptRoot ../build/DotNet/DotNet.csproj
@ -61,7 +62,17 @@ if ($OnWindows)
# Put our local dotnet.exe on PATH first so Visual Studio knows which one to use
$env:PATH=($dotnet + [IO.Path]::PathSeparator + $env:PATH)
# Have to build the solution first so the xbf files are there for pack
# Have to build the solution first so the xbf files are there for pack
& $msbuild $slnnet6 `
/p:configuration=$configuration `
/p:SymbolPackageFormat=snupkg `
/restore `
/t:build `
/p:Packing=true `
/bl:"$artifacts/maui-graphics-net6-build-$configuration.binlog"
if (!$?) { throw "Build failed." }
& $msbuild $sln `
/p:configuration=$configuration `
/p:SymbolPackageFormat=snupkg `
@ -69,14 +80,15 @@ if ($OnWindows)
/t:build `
/p:Packing=true `
/bl:"$artifacts/maui-graphics-build-$configuration.binlog"
if (!$?) { throw "Build failed." }
if (!$?) { throw "Build failed." }
& $msbuild $sln `
/p:configuration=$configuration `
/p:SymbolPackageFormat=snupkg `
/t:pack `
/p:Packing=true `
/bl:"$artifacts/maui-graphics-pack-$configuration.binlog"
# & $msbuild $sln `
# /p:configuration=$configuration `
# /p:SymbolPackageFormat=snupkg `
# /t:pack `
# /p:Packing=true `
# /bl:"$artifacts/maui-graphics-pack-$configuration.binlog"
if (!$?) { throw "Pack failed." }
}
finally