This repository was archived by the owner on Jan 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildAll.ps1
More file actions
84 lines (69 loc) · 2.71 KB
/
BuildAll.ps1
File metadata and controls
84 lines (69 loc) · 2.71 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Param(
[string]$Configuration="Release",
[switch]$AllowVsPreReleases,
[switch]$NoClean
)
. .\buildutils.ps1
# Main Script entry point -----------
pushd $PSScriptRoot
$oldPath = $env:Path
$ErrorActionPreference = "Stop"
$InformationPreference = "Continue"
try
{
$msbuild = Find-MSBuild -AllowVsPrereleases:$AllowVsPreReleases
if( !$msbuild )
{
throw "MSBuild not found"
}
if( !$msbuild.FoundOnPath )
{
$env:Path = "$env:Path;$($msbuild.BinPath)"
}
# setup standard MSBuild logging for this build
$msbuildLoggerArgs = @('/clp:Verbosity=Minimal')
if (Test-Path "C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
{
$msbuildLoggerArgs = $msbuildLoggerArgs + @("/logger:`"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll`"")
}
$buildPaths = Get-BuildPaths $PSScriptRoot
Write-Information "Build Paths:"
Write-Information ($buildPaths | Format-Table | Out-String)
if( (Test-Path -PathType Container $buildPaths.BuildOutputPath) -and !$NoClean )
{
Write-Information "Cleaning output folder from previous builds"
rd -Recurse -Force -Path $buildPaths.BuildOutputPath
}
$BuildInfo = Get-BuildInformation $buildPaths
if($env:APPVEYOR)
{
Update-AppVeyorBuild -Version $BuildInfo.FullBuildNumber
}
$msBuildProperties = @{ Configuration = $Configuration
FullBuildNumber = $BuildInfo.FullBuildNumber
PackageVersion = $BuildInfo.PackageVersion
FileVersionMajor = $BuildInfo.FileVersionMajor
FileVersionMinor = $BuildInfo.FileVersionMinor
FileVersionBuild = $BuildInfo.FileVersionBuild
FileVersionRevision = $BuildInfo.FileVersionRevision
FileVersion = $BuildInfo.FileVersion
}
Write-Information "Build Parameters:"
Write-Information ($BuildInfo | Format-Table | Out-String)
Write-Information "Restoring NuGet Packages..."
Invoke-MSBuild -Targets 'Restore;Build' -Project RestoreIdeUI.sln -Properties $msBuildProperties -LoggerArgs $msbuildLoggerArgs ($msbuildLoggerArgs + @("/bl:Llvm.NET-restore.binlog") )
# Write-Information "Building Solution..."
# Invoke-MSBuild -Targets Build -Project RestoreIdeUI.sln -Properties $msBuildProperties -LoggerArgs $msbuildLoggerArgs ($msbuildLoggerArgs + @("/bl:Llvm.NET-build.binlog") )
if( $env:APPVEYOR_PULL_REQUEST_NUMBER )
{
foreach( $item in Get-ChildItem *.binlog )
{
Push-AppveyorArtifact $item.FullName
}
}
}
finally
{
popd
$env:Path = $oldPath
}