Skip to content

Commit

Permalink
Upgrade Pivet to .NET Core 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tslater2006 committed Oct 16, 2019
1 parent bc9da87 commit 66c3016
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 36 deletions.
10 changes: 5 additions & 5 deletions Pivet/Pivet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
<RuntimeFrameworkVersion>2.2.7</RuntimeFrameworkVersion>
<RuntimeIdentifiers>win10-x64;linux-x64</RuntimeIdentifiers>
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
<RuntimeIdentifiers>win10-x64;osx-x64;linux-x64;rhel-x64</RuntimeIdentifiers>
<StartupObject>Pivet.Program</StartupObject>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp2.2|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp3.0|AnyCPU'">
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>TRACE;DEBUG;NETCOREAPP;NETCOREAPP2_2</DefineConstants>
<DefineConstants>TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_0</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Pivet/Properties/PublishProfiles/Linux.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.2\publish\linux\</PublishDir>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PublishDir>bin\Release\netcoreapp3.0\publish\linux\</PublishDir>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
Expand Down
4 changes: 2 additions & 2 deletions Pivet/Properties/PublishProfiles/LinuxSelfContained.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.2\publish\linux-self-contained</PublishDir>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PublishDir>bin\Release\netcoreapp3.0\publish\linux-self-contained</PublishDir>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<_IsPortable>true</_IsPortable>
Expand Down
4 changes: 2 additions & 2 deletions Pivet/Properties/PublishProfiles/RedHat.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.2\publish\rhel</PublishDir>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PublishDir>bin\Release\netcoreapp3.0\publish\rhel</PublishDir>
<RuntimeIdentifier>rhel-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
Expand Down
4 changes: 2 additions & 2 deletions Pivet/Properties/PublishProfiles/RedHatSelfContained.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.2\publish\rhel-self-contained</PublishDir>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PublishDir>bin\Release\netcoreapp3.0\publish\rhel-self-contained</PublishDir>
<RuntimeIdentifier>rhel-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<_IsPortable>true</_IsPortable>
Expand Down
4 changes: 2 additions & 2 deletions Pivet/Properties/PublishProfiles/Windows.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.2\publish\windows</PublishDir>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PublishDir>bin\Release\netcoreapp3.0\publish\windows</PublishDir>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
Expand Down
4 changes: 2 additions & 2 deletions Pivet/Properties/PublishProfiles/WindowsSelfContained.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.2\publish\windows-self-contained</PublishDir>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PublishDir>bin\Release\netcoreapp3.0\publish\windows-self-contained</PublishDir>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<_IsPortable>true</_IsPortable>
Expand Down
7 changes: 3 additions & 4 deletions SamplePlugin/SamplePlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
<RuntimeFrameworkVersion>2.2.7</RuntimeFrameworkVersion>
<RuntimeIdentifiers>win10-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<TargetFramework>netcoreapp3.0</TargetFramework>
<RuntimeIdentifiers>win10-x64;osx-x64;linux-x64;rhel-x64</RuntimeIdentifiers>
</PropertyGroup>


Expand Down
30 changes: 15 additions & 15 deletions publish.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
if (Test-Path ".\Pivet\bin\Release\netcoreapp2.2\publish\") {
Remove-Item ".\Pivet\bin\Release\netcoreapp2.2\publish\" -Recurse -Force;
if (Test-Path ".\Pivet\bin\Release\netcoreapp3.0\publish\") {
Remove-Item ".\Pivet\bin\Release\netcoreapp3.0\publish\" -Recurse -Force;
}

dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=Linux /p:Configuration=Release -f netcoreapp2.2
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=Windows /p:Configuration=Release -f netcoreapp2.2
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=RedHat /p:Configuration=Release -f netcoreapp2.2
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=Linux /p:Configuration=Release -f netcoreapp3.0
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=Windows /p:Configuration=Release -f netcoreapp3.0
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=RedHat /p:Configuration=Release -f netcoreapp3.0

dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=LinuxSelfContained /p:Configuration=Release -f netcoreapp2.2
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=WindowsSelfContained /p:Configuration=Release -f netcoreapp2.2
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=RedHatSelfContained /p:Configuration=Release -f netcoreapp2.2
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=LinuxSelfContained /p:Configuration=Release -f netcoreapp3.0
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=WindowsSelfContained /p:Configuration=Release -f netcoreapp3.0
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=RedHatSelfContained /p:Configuration=Release -f netcoreapp3.0

If(!(test-path ".\build"))
{
Expand All @@ -18,12 +18,12 @@ If(!(test-path ".\build"))
$commit= &git rev-parse HEAD
$hash = $commit.Substring(0,7)

Get-ChildItem -Recurse -Path .\Pivet\bin\Release\netcoreapp2.2\publish\ *.pdb | foreach {Remove-Item -Path $_.FullName}
Get-ChildItem -Recurse -Path .\Pivet\bin\Release\netcoreapp3.0\publish\ *.pdb | foreach {Remove-Item -Path $_.FullName}

Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp2.2\publish\linux\* -DestinationPath ".\build\linux-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp2.2\publish\windows\* -DestinationPath ".\build\windows-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp2.2\publish\rhel\* -DestinationPath ".\build\redhat-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp3.0\publish\linux\* -DestinationPath ".\build\linux-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp3.0\publish\windows\* -DestinationPath ".\build\windows-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp3.0\publish\rhel\* -DestinationPath ".\build\redhat-$($hash).zip"

Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp2.2\publish\linux-self-contained\* -DestinationPath ".\build\linux-self-contained-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp2.2\publish\windows-self-contained\* -DestinationPath ".\build\windows-self-contained-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp2.2\publish\rhel-self-contained\* -DestinationPath ".\build\redhat-self-contained-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp3.0\publish\linux-self-contained\* -DestinationPath ".\build\linux-self-contained-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp3.0\publish\windows-self-contained\* -DestinationPath ".\build\windows-self-contained-$($hash).zip"
Compress-Archive -Force -Path .\Pivet\bin\Release\netcoreapp3.0\publish\rhel-self-contained\* -DestinationPath ".\build\redhat-self-contained-$($hash).zip"

0 comments on commit 66c3016

Please sign in to comment.