File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,19 +200,24 @@ Function Sign-Binaries {
200200 [int ]$BuildNumber = (Get-BuildNumber ),
201201 [string ]$MSBuildVersion = $DefaultMSBuildVersion ,
202202 [string []]$ProjectsToSign = $null ,
203- [switch ]$BinLog
203+ [switch ]$BinLog ,
204+ [string ]$RepositoryRootDirectory = $null
204205 )
205206
206- if ($ProjectsToSign -eq $null ) {
207+ if ($null -eq $ProjectsToSign ) {
207208 $repositoryDir = [IO.Path ]::GetDirectoryName($PSScriptRoot )
208209 $defaultProjectsToSign = Join-Path $repositoryDir " src\**\*.csproj"
209210 $ProjectsToSign = @ ($defaultProjectsToSign )
210211 }
211212
212213 $projectsToSignProperty = $ProjectsToSign -join ' ;'
214+ $msbuildProperties = " /p:ProjectsToSign=`" $projectsToSignProperty `" "
215+ if ($RepositoryRootDirectory ) {
216+ $msbuildProperties += " ;RepositoryRootDirectory=`" $RepositoryRootDirectory `" "
217+ }
213218
214219 $ProjectPath = Join-Path $PSScriptRoot " sign-binaries.proj"
215- Build-Solution $Configuration $BuildNumber - MSBuildVersion " $MSBuildVersion " $ProjectPath - MSBuildProperties " /p:ProjectsToSign= `" $projectsToSignProperty `" " - BinLog:$BinLog
220+ Build-Solution $Configuration $BuildNumber - MSBuildVersion " $MSBuildVersion " $ProjectPath - MSBuildProperties $msbuildProperties - BinLog:$BinLog
216221}
217222
218223Function Sign-Packages {
Original file line number Diff line number Diff line change 33 <Import Project =" ..\packages\MicroBuild.Core\build\MicroBuild.Core.props" Condition =" Exists('..\packages\MicroBuild.Core\build\MicroBuild.Core.props')" />
44
55 <PropertyGroup >
6- <RepositoryRootDirectory >$([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory)))\</RepositoryRootDirectory >
6+ <RepositoryRootDirectory Condition = " '$(RepositoryRootDirectory)' == '' " >$([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory)))\</RepositoryRootDirectory >
77 <IntermediateOutputPath >$(RepositoryRootDirectory)artifacts\sign\obj\</IntermediateOutputPath >
88 <OutDir >$(RepositoryRootDirectory)</OutDir >
99 <SignTargetsDependOn >BatchSign</SignTargetsDependOn >
You can’t perform that action at this time.
0 commit comments