Skip to content

Commit

Permalink
Merge pull request #102 from microsoft/develop
Browse files Browse the repository at this point in the history
FO 3.1.1, CO 2.1.0, FOW 2.0.0
  • Loading branch information
GitTorre authored Dec 19, 2020
2 parents 985b222 + 26aa28c commit 2e1b49c
Show file tree
Hide file tree
Showing 56 changed files with 1,395 additions and 1,171 deletions.
32 changes: 32 additions & 0 deletions Build-FOWNugetPackages.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function Build-Nuget {
param (
[string]
$packageId,

[string]
$basePath
)

[string] $nugetSpecTemplate = [System.IO.File]::ReadAllText([System.IO.Path]::Combine($scriptPath, "FabricObserverWebApi.nuspec.template"))

[string] $nugetSpecPath = "$scriptPath\bin\release\FabricObserverWeb\$($packageId).nuspec"

[System.IO.File]::WriteAllText($nugetSpecPath, $nugetSpecTemplate.Replace("%PACKAGE_ID%", $packageId))

.\nuget.exe pack $nugetSpecPath -basepath $basePath -OutputDirectory bin\release\FabricObserverWeb\Nugets -properties NoWarn=NU5100
}

[string] $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition

try {
Push-Location $scriptPath

Build-Nuget "FabricObserverWeb.Linux.SelfContained" "$scriptPath\bin\release\FabricObserverWeb\linux-x64\self-contained\FabricObserverWebApiType"
Build-Nuget "FabricObserverWeb.Linux.FrameworkDependent" "$scriptPath\bin\release\FabricObserverWeb\linux-x64\framework-dependent\FabricObserverWebApiType"

Build-Nuget "FabricObserverWeb.Windows.SelfContained" "$scriptPath\bin\release\FabricObserverWeb\win-x64\self-contained\FabricObserverWebApiType"
Build-Nuget "FabricObserverWeb.Windows.FrameworkDependent" "$scriptPath\bin\release\FabricObserverWeb\win-x64\framework-dependent\FabricObserverWebApiType"
}
finally {
Pop-Location
}
34 changes: 34 additions & 0 deletions Build-FOWSFPkgs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[string] $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition

function Build-SFPkg {
param (
[string]
$packageId,

[string]
$basePath
)

$ProgressPreference = "SilentlyContinue"

[string] $outputDir = "$scriptPath\bin\release\FabricObserverWeb\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 "FabricObserverWeb.Linux.SelfContained" "$scriptPath\bin\release\FabricObserverWeb\linux-x64\self-contained\FabricObserverWebApiType"
Build-SFPkg "FabricObserverWeb.Linux.FrameworkDependent" "$scriptPath\bin\release\FabricObserverWeb\linux-x64\framework-dependent\FabricObserverWebApiType"

Build-SFPkg "FabricObserverWeb.Windows.SelfContained" "$scriptPath\bin\release\FabricObserverWeb\win-x64\self-contained\FabricObserverWebApiType"
Build-SFPkg "FabricObserverWeb.Windows.FrameworkDependent" "$scriptPath\bin\release\FabricObserverWeb\win-x64\framework-dependent\FabricObserverWebApiType"
}
finally {
Pop-Location
}
29 changes: 29 additions & 0 deletions Build-FabricObserverWebApi.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
$ErrorActionPreference = "Stop"

$Configuration="Release"
[string] $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition

try {
Push-Location $scriptPath

Remove-Item $scriptPath\bin\release\FabricObserverWeb\ -Recurse -Force -EA SilentlyContinue

dotnet publish FabricObserverWeb\FabricObserverWeb.csproj -o bin\release\FabricObserverWeb\linux-x64\self-contained\FabricObserverWebApiType\FabricObserverWebPkg\Code -c $Configuration -r linux-x64 --self-contained true
dotnet publish FabricObserverWeb\FabricObserverWeb.csproj -o bin\release\FabricObserverWeb\linux-x64\framework-dependent\FabricObserverWebApiType\FabricObserverWebPkg\Code -c $Configuration -r linux-x64 --self-contained false
dotnet publish FabricObserverWeb\FabricObserverWeb.csproj -o bin\release\FabricObserverWeb\win-x64\self-contained\FabricObserverWebApiType\FabricObserverWebPkg\Code -c $Configuration -r win-x64 --self-contained true
dotnet publish FabricObserverWeb\FabricObserverWeb.csproj -o bin\release\FabricObserverWeb\win-x64\framework-dependent\FabricObserverWebApiType\FabricObserverWebPkg\Code -c $Configuration -r win-x64 --self-contained false

Copy-Item FabricObserverWeb\PackageRoot\* bin\release\FabricObserverWeb\linux-x64\self-contained\FabricObserverWebApiType\FabricObserverWebPkg\ -Recurse
Copy-Item FabricObserverWeb\PackageRoot\* bin\release\FabricObserverWeb\linux-x64\framework-dependent\FabricObserverWebApiType\FabricObserverWebPkg\ -Recurse

Copy-Item FabricObserverWeb\PackageRoot\* bin\release\FabricObserverWeb\win-x64\self-contained\FabricObserverWebApiType\FabricObserverWebPkg\ -Recurse
Copy-Item FabricObserverWeb\PackageRoot\* bin\release\FabricObserverWeb\win-x64\framework-dependent\FabricObserverWebApiType\FabricObserverWebPkg\ -Recurse

Copy-Item FabricObserverWebApp\ApplicationPackageRoot\ApplicationManifest.xml bin\release\FabricObserverWeb\linux-x64\self-contained\FabricObserverWebApiType\ApplicationManifest.xml
Copy-Item FabricObserverWebApp\ApplicationPackageRoot\ApplicationManifest.xml bin\release\FabricObserverWeb\linux-x64\framework-dependent\FabricObserverWebApiType\ApplicationManifest.xml
Copy-Item FabricObserverWebApp\ApplicationPackageRoot\ApplicationManifest.xml bin\release\FabricObserverWeb\win-x64\self-contained\FabricObserverWebApiType\ApplicationManifest.xml
Copy-Item FabricObserverWebApp\ApplicationPackageRoot\ApplicationManifest.xml bin\release\FabricObserverWeb\win-x64\framework-dependent\FabricObserverWebApiType\ApplicationManifest.xml
}
finally {
Pop-Location
}
4 changes: 2 additions & 2 deletions ClusterObserver.nuspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="3.3.0">
<id>%PACKAGE_ID%</id>
<version>2.0.3</version>
<version>2.1.0</version>
<authors>ctorre</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>This package contains the Service Fabric ClusterObserver Application (Config files and Microsoft-signed binaries).</description>
Expand All @@ -16,6 +16,6 @@
</metadata>
<files>
<file src="**" target="contentFiles\any\any" />
<file src="ClusterObserverPkg\Code\FabricClusterObserver.dll" target="lib\netstandard2.1"/>
<file src="ClusterObserverPkg\Code\ClusterObserver.dll" target="lib\netstandard2.1"/>
</files>
</package>
Loading

0 comments on commit 2e1b49c

Please sign in to comment.