-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPSakeBuild.ps1
More file actions
34 lines (24 loc) · 748 Bytes
/
PSakeBuild.ps1
File metadata and controls
34 lines (24 loc) · 748 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
29
30
31
32
33
34
task default -depends Build
Task Build {
.\BuildMP.ps1
}
Task BuildMP -requiredVariables "File" {
$MPBuildDir = $(Resolve-Path "$PSScriptRoot\Management Packs").Path
# Walk the folder back up, until MP folder is found.
$MPDir = $File
$MPRootDirNotFound = $true
while ($MPRootDirNotFound) {
$prevDir = $MPDir
$MPDir = Split-Path -Path $MPDir -Parent
# Check if the MPBuildDir has been reached.
if ($MPDir -eq $MPBuildDir) {
# Restore the previous folder level, and quit the loop.
$MPDir = $prevDir
$MPRootDirNotFound = $false
}
}
.\BuildMP.ps1 -MPDir $MPDir
}
Task Seal -requiredVariables "File" {
.\MPSeal.ps1 -XMLFile $File
}