forked from shiftkey/Reactive.EventAggregator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
32 lines (22 loc) · 939 Bytes
/
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
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
$nuget = Join-Path (Get-ScriptDirectory) src\.nuget\NuGet.exe
# ensure all packages are installed
$config = Join-Path (Get-ScriptDirectory) src\Reactive.EventAggregator\packages.config
$solution_dir = Join-Path (Get-ScriptDirectory) src
. $nuget restore .\src\Reactive.EventAggregator.sln
# build the solution from scratch
$version = "v4.0.30319"
$sln = Join-Path (Get-ScriptDirectory) src\Reactive.EventAggregator.sln
. $env:windir\Microsoft.NET\Framework\$version\MSBuild.exe $sln /t:Rebuild /p:Configuration=Release /m /v:q
# package it up
$nuspec = Join-Path (Get-ScriptDirectory) src\Reactive.EventAggregator\Reactive.EventAggregator.nuspec
$nugetVersion = $env:APPVEYOR_BUILD_VERSION
if ($nugetVersion -eq $null)
{
$nugetVersion = "2.0.0"
}
. $nuget pack $nuspec -Version $nugetVersion