File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<packages >
33 <package id =" xunit.runner.console" version =" 2.1.0" />
4+ <package id =" MicroBuild.Core" version =" 0.3.0" />
45</packages >
Original file line number Diff line number Diff line change 99 [string ]$SemanticVersion = ' 1.0.0-zlocal' ,
1010 [string ]$Branch ,
1111 [string ]$CommitSHA ,
12- [string ]$BuildBranch = ' 795fed66b8bae2d248237ee5ec82e688e7174a42 '
12+ [string ]$BuildBranch = ' 1c8734ee61e209f159972ab974784ba55ee2bd6d '
1313)
1414
1515$msBuildVersion = 15 ;
@@ -30,7 +30,7 @@ if (-not (Test-Path "$PSScriptRoot/build")) {
3030# Enable TLS 1.2 since GitHub requires it.
3131[Net.ServicePointManager ]::SecurityProtocol = [Net.ServicePointManager ]::SecurityProtocol -bor [Net.SecurityProtocolType ]::Tls12
3232
33- wget - UseBasicParsing - Uri " https://raw.githubusercontent.com/NuGet/ServerCommon/$BuildBranch /build/init.ps1" - OutFile " $PSScriptRoot /build/init.ps1"
33+ Invoke-WebRequest - UseBasicParsing - Uri " https://raw.githubusercontent.com/NuGet/ServerCommon/$BuildBranch /build/init.ps1" - OutFile " $PSScriptRoot /build/init.ps1"
3434. " $PSScriptRoot /build/init.ps1" - BuildBranch " $BuildBranch "
3535
3636Write-Host (" `r`n " * 3 )
@@ -91,6 +91,12 @@ Invoke-BuildStep 'Creating artifacts' {
9191 } `
9292 - ev + BuildErrors
9393
94+ Invoke-BuildStep ' Signing the packages' {
95+ $ProjectPath = Join-Path $PSScriptRoot " build\sign.proj"
96+ Build-Solution $Configuration $BuildNumber - MSBuildVersion " $msBuildVersion " $ProjectPath `
97+ } `
98+ - ev + BuildErrors
99+
94100Trace-Log (' -' * 60 )
95101
96102# # Calculating Build time
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <Project ToolsVersion =" 15.0" DefaultTargets =" AfterBuild" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3+ <Import Project =" ..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.props" Condition =" Exists('..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.props')" />
4+
5+ <PropertyGroup >
6+ <RepositoryRootDirectory >$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\</RepositoryRootDirectory >
7+ <IntermediateOutputPath >$(RepositoryRootDirectory)artifacts\sign\obj\</IntermediateOutputPath >
8+ <OutDir >$(RepositoryRootDirectory)</OutDir >
9+ <SignTargetsDependOn >GetOutputNupkgs</SignTargetsDependOn >
10+ </PropertyGroup >
11+
12+ <Target Name =" GetOutputNupkgs" >
13+ <ItemGroup >
14+ <FilesToSign Include =" $(RepositoryRootDirectory)artifacts\*.nupkg" >
15+ <Authenticode >NuGet</Authenticode >
16+ </FilesToSign >
17+ </ItemGroup >
18+ <Message Text =" Files to sign:%0A@(FilesToSign, '%0A')" Importance =" High" />
19+ </Target >
20+
21+ <Target Name =" AfterBuild" DependsOnTargets =" $(SignTargetsDependOn)" />
22+
23+ <Import Project =" ..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.targets" Condition =" Exists('..\packages\MicroBuild.Core.0.3.0\build\MicroBuild.Core.targets')" />
24+ </Project >
You can’t perform that action at this time.
0 commit comments