-
Notifications
You must be signed in to change notification settings - Fork 37
/
Build-SFPkgs.ps1
34 lines (25 loc) · 1.35 KB
/
Build-SFPkgs.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
[string] $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
function Build-SFPkg {
param (
[string]
$packageId,
[string]
$basePath
)
$ProgressPreference = "SilentlyContinue"
[string] $outputDir = "$scriptPath\bin\release\FabricObserver\SFPkgs"
[string] $zipPath = "$outputDir\$($packageId).zip"
[System.IO.Directory]::CreateDirectory($outputDir) | Out-Null
Compress-Archive "$basePath\*" $zipPath -Force
Move-Item -Path $zipPath -Destination ($zipPath.Replace(".zip", ".sfpkg"))
}
try {
Push-Location $scriptPath
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.SelfContained.3.3.0" "$scriptPath\bin\release\FabricObserver\linux-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.FrameworkDependent.3.3.0" "$scriptPath\bin\release\FabricObserver\linux-x64\framework-dependent\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.3.0" "$scriptPath\bin\release\FabricObserver\win-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.FrameworkDependent.3.3.0" "$scriptPath\bin\release\FabricObserver\win-x64\framework-dependent\FabricObserverType"
}
finally {
Pop-Location
}