forked from dotnet/aspnetcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
47 lines (40 loc) · 1.24 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#requires -version 5
[cmdletbinding()]
param(
[switch]$ci,
[Alias("x86")]
[string]$sharedfx86harvestroot,
[Alias("x64")]
[string]$sharedfx64harvestroot,
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$AdditionalArgs
)
$ErrorActionPreference = 'Stop'
$repoRoot = Resolve-Path "$PSScriptRoot/../../../"
Import-Module -Scope Local "$repoRoot/eng/scripts/common.psm1" -Force
$harvestRoot = "$repoRoot/obj/sfx/"
if ($clean) {
Remove-Item -Recurse -Force $harvestRoot -ErrorAction Ignore | Out-Null
}
# TODO: harvest shared frameworks from a project reference
New-Item "$harvestRoot/x86", "$harvestRoot/x64" -ItemType Directory -ErrorAction Ignore | Out-Null
[string[]] $msbuildargs = @()
if (-not $sharedfx86harvestroot) {
$msbuildargs += "-p:SharedFrameworkX86HarvestRootPath=$sharedfx86harvestroot"
}
if (-not $sharedfx64harvestroot) {
$msbuildargs += "-p:SharedFrameworkX64HarvestRootPath=$sharedfx64harvestroot"
}
Push-Location $PSScriptRoot
try {
& $repoRoot/eng/build.ps1 `
-ci:$ci `
-sign `
-BuildInstallers `
"-bl:$repoRoot/artifacts/log/installers.msbuild.binlog" `
@msbuildargs `
@AdditionalArgs
}
finally {
Pop-Location
}