-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdefault.ps1
More file actions
28 lines (22 loc) · 775 Bytes
/
default.ps1
File metadata and controls
28 lines (22 loc) · 775 Bytes
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
Properties { # Directories
$base_dir = Resolve-Path .
$lib_dir = "$base_dir\lib"
$build_dir = "$base_dir\build"
}
Properties { # Projects and solutions
$sln_file = "$base_dir\src\AutoBot.sln"
}
$framework = '4.0'
Task default -depends Compile
### Shared tasks, used regardless of environment
task Clean {
if (test-path $build_dir) { remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue }
}
Task Compile -depends Clean {
Write-Output $sln_file
exec { & msbuild $sln_file /t:Build /p:Configuration=Release /v:q }
}
Task Package -depends Compile {
#Copy Scripts that have been dumped in the $base_dir\src\AutoBot.Cmd\Scripts file by any other means
exec { & xcopy $base_dir\src\AutoBot\Scripts $base_dir\build\Scripts /S/Y/I }
}