-
Notifications
You must be signed in to change notification settings - Fork 8
/
default.ps1
40 lines (34 loc) · 1.04 KB
/
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
31
32
33
34
35
36
37
38
39
40
Framework "4.6"
properties {
$BaseDir = Resolve-Path ".\src"
$SolutionFile = "$BaseDir\Topshelf.StructureMap.sln"
$OutputDir1 = "$BaseDir\Topshelf.StructureMap\bin"
$OutputDir2 = "$BaseDir\Topshelf.Quartz.Structuremap\bin"
$Configuration = "Release"
}
task default -depends Build
task Init {
cls
}
task Clean -depends Init {
if (Test-Path $OutputDir1) {
ri $OutputDir1 -Recurse
}
if (Test-Path $OutputDir2) {
ri $OutputDir2 -Recurse
}
}
task RestorePackages {
exec { dotnet restore $solutionFile }
}
task Build -depends Init,Clean,RestorePackages {
exec { dotnet build $SolutionFile --configuration $Configuration --no-restore --no-incremental }
}
task Publish -depends Build {
exec {
dotnet pack "$BaseDir\Topshelf.StructureMap\Topshelf.StructureMap.csproj" -o $OutputDir1 --no-build --include-symbols -c $Configuration
}
exec {
dotnet pack "$BaseDir\Topshelf.Quartz.StructureMap\Topshelf.Quartz.StructureMap.csproj" -o $OutputDir2 --no-build --include-symbols -c $Configuration
}
}