-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.ps1
30 lines (24 loc) · 888 Bytes
/
default.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
properties {
$buildDir = ".\build"
$outputDir = $buildDir + "\lib\" + $framework
$nunitDir = (gci -fi NUnit* .\source\packages).FullName
$nunit = (gci $nunitDir\Tools\nunit-console.exe)
}
task default -depends Compile, Clean
task Init -depends Clean {
mkdir $outputDir | out-null
}
task Compile -depends Init {
msbuild /p:Configuration=Release .\source\CommonServiceFactory.sln
}
task Test -depends Compile {
. $nunit .\source\CommonServiceFactory.Tests\bin\Release\CommonServiceFactory.Tests.dll
}
task Package -depends Test {
copy .\source\CommonServiceFactory\bin\Release\CommonServiceFactory.dll $outputDir
.\Tools\nuget\NuGet.exe pack .\CommonServiceFactory.nuspec -b .\build -o .\build
}
task Clean {
if (test-path $buildDir) { ri -r -fo $buildDir }
msbuild /t:Clean /p:Configuration=Release .\source\CommonServiceFactory.sln
}