2023-03-15 04:37:07 +03:00
|
|
|
[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
|
|
|
|
|
2024-08-06 21:18:36 +03:00
|
|
|
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"
|
2023-03-15 04:37:07 +03:00
|
|
|
|
2024-08-06 21:18:36 +03:00
|
|
|
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"
|
2023-03-15 04:37:07 +03:00
|
|
|
}
|
|
|
|
finally {
|
|
|
|
Pop-Location
|
2020-07-21 22:33:49 +03:00
|
|
|
}
|