Skip to content

Commit

Permalink
Symbol packages (snupkg) must be published by v3 nuget api
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeuchler committed Nov 4, 2020
1 parent 4cd636c commit d2d360f
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 9 deletions.
23 changes: 20 additions & 3 deletions .build/BuildToolkit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ function Invoke-Initialize([string]$Version = "1.0.0", [bool]$Cleanup = $False)
$env:MORYX_PACKAGE_TARGET = "";
}

if (-not $env:MORYX_PACKAGE_TARGET_V3) {
$env:MORYX_PACKAGE_TARGET_V3 = "";
}

if (-not $env:MORYX_ASSEMBLY_VERSION) {
$env:MORYX_ASSEMBLY_VERSION = $Version;
}
Expand Down Expand Up @@ -140,6 +144,7 @@ function Invoke-Initialize([string]$Version = "1.0.0", [bool]$Cleanup = $False)
Write-Variable "MORYX_TEST_VERBOSITY" $env:MORYX_TEST_VERBOSITY;
Write-Variable "MORYX_NUGET_VERBOSITY" $env:MORYX_NUGET_VERBOSITY;
Write-Variable "MORYX_PACKAGE_TARGET" $env:MORYX_PACKAGE_TARGET;
Write-Variable "MORYX_PACKAGE_TARGET_V3" $env:MORYX_PACKAGE_TARGET_V3;

Write-Variable "MORYX_ASSEMBLY_VERSION" $env:MORYX_ASSEMBLY_VERSION;
Write-Variable "MORYX_FILE_VERSION" $env:MORYX_FILE_VERSION;
Expand Down Expand Up @@ -488,17 +493,29 @@ function Invoke-PackAll([switch]$Symbols = $False) {
function Invoke-Publish {
Write-Host "Pushing packages from $NugetPackageArtifacts to $env:MORYX_PACKAGE_TARGET"

if ([string]::IsNullOrEmpty($env:MORYX_PACKAGE_TARGET)) {
$packages = Get-ChildItem $NugetPackageArtifacts -Recurse -Include *.nupkg
if ($packages.Length -gt 0 -and [string]::IsNullOrEmpty($env:MORYX_PACKAGE_TARGET)) {
Write-Host-Error "There is no package target given. Set the environment varialble MORYX_PACKAGE_TARGET to publish packages.";
Invoke-ExitCodeCheck 1;
}

$packages = Get-ChildItem $NugetPackageArtifacts -Recurse -Include *.nupkg, *.snupkg

foreach ($package in $packages) {
Write-Host "Pushing package $package"
& $global:NugetCli push $package $env:MORYX_NUGET_APIKEY -Source $env:MORYX_PACKAGE_TARGET -Verbosity $env:MORYX_NUGET_VERBOSITY
Invoke-ExitCodeCheck $LastExitCode;
}

$symbolPackages = Get-ChildItem $NugetPackageArtifacts -Recurse -Include *.snupkg
if ($symbolPackages.Length -gt 0 -and [string]::IsNullOrEmpty($env:MORYX_PACKAGE_TARGET_V3)) {
Write-Host-Error "There is no package (v3) target given. Set the environment varialble MORYX_PACKAGE_TARGET_V3 to publish snupkg symbol packages.";
Invoke-ExitCodeCheck 1;
}

foreach ($symbolPackage in $symbolPackages) {
Write-Host "Pushing symbol (snupkg) $symbolPackage"
& $global:NugetCli push $symbolPackage $env:MORYX_NUGET_APIKEY -Source $env:MORYX_PACKAGE_TARGET_V3 -Verbosity $env:MORYX_NUGET_VERBOSITY
Invoke-ExitCodeCheck $LastExitCode;
}
}

function Set-Version ([string]$MajorMinorPatch) {
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
MORYX_BUILDNUMBER: ${{github.run_number}}
MORYX_NUGET_APIKEY: ${{secrets.MYGET_TOKEN}}
MORYX_PACKAGE_TARGET: "https://www.myget.org/F/moryx/api/v2/package"
MORYX_PACKAGE_TARGET_V3: "https://www.myget.org/F/moryx/api/v3/index.json"

jobs:
Build:
Expand Down
5 changes: 0 additions & 5 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

<Import Project=".build\Common.props" Condition="'$(CreatePackage)' == 'true'" />

<!-- Properties for all projects if CreatePackage=true -->
<PropertyGroup Condition="'$(CreatePackage)' == 'true'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<!-- Package refereces for all projects if CreatePackage=true -->
<ItemGroup Condition="'$(CreatePackage)' == 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Library for serial port communication.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Container/Moryx.Container.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Handling of container structure.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Model.InMemory/Moryx.Model.InMemory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>InMemory extension to Moryx.Model.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Model.PostgreSQL/Moryx.Model.PostgreSQL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net45;net461</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>EntityFramework DataModel based on Npgsql.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Model/Moryx.Model.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Extended model functionality.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Moryx.Runtime.DbUpdate/Moryx.Runtime.DbUpdate.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Runtime RunMode for executing database migrations.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Runtime.Kernel/Moryx.Runtime.Kernel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Main kernel abstraction for the runtime environment</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Core module to maintain the application. It provides config and logging support by default.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Runtime.SmokeTest/Moryx.Runtime.SmokeTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Runtime RunMode for executing smoke tests.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Runtime.Wcf/Moryx.Runtime.Wcf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Extensions for the Moryx.Runtime for hosting wcf services.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Provides runtime mode for running as Windows Service.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Runtime/Moryx.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Contains core interfaces for the runtime environment.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Library with helper classes for SystemTests.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Library with helper classes for UnitTests.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx.Tools.Wcf/Moryx.Tools.Wcf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net45;net461</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Wcf integation in Platform.</Description>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Moryx/Moryx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net461</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>Root namespace of the MORYX ecosystem</Description>
<CreatePackage>true</CreatePackage>
Expand Down

0 comments on commit d2d360f

Please sign in to comment.