Skip to content

Commit

Permalink
Upgrade to .NET 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tslater2006 committed Feb 24, 2022
1 parent e413d7f commit f548f4d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
11 changes: 3 additions & 8 deletions Pivet/Pivet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,20 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
<RuntimeFrameworkVersion>2.2.7</RuntimeFrameworkVersion>
<TargetFrameworks>net6.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|net6.0|AnyCPU'">
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>TRACE;DEBUG;NETCOREAPP;NETCOREAPP2_2</DefineConstants>
<DefineConstants>TRACE;DEBUG;</DefineConstants>
</PropertyGroup>

<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>

<ItemGroup>
<Reference Include="netstandard" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BasicSQLFormatter" Version="1.0.3" />
<PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0175" />
Expand Down
3 changes: 2 additions & 1 deletion SamplePlugin/SamplePlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifiers>win10-x64;osx-x64;linux-x64;rhel-x64</RuntimeIdentifiers>
<OutputType>Library</OutputType>
</PropertyGroup>


Expand Down
34 changes: 18 additions & 16 deletions publish.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
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\net6.0\publish\") {
Remove-Item ".\Pivet\bin\Release\net6.0\" -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=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

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

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"
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=Linux /p:Configuration=Release -f net6.0
Compress-Archive -Force -Path .\Pivet\bin\Release\net6.0\linux-x64\* -DestinationPath ".\build\linux-$($hash).zip"

dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=Windows /p:Configuration=Release -f net6.0
Compress-Archive -Force -Path .\Pivet\bin\Release\net6.0\win10-x64\* -DestinationPath ".\build\windows-$($hash).zip"

dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=RedHat /p:Configuration=Release -f net6.0
Compress-Archive -Force -Path .\Pivet\bin\Release\net6.0\rhel-x64\* -DestinationPath ".\build\redhat-$($hash).zip"

dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=LinuxSelfContained /p:Configuration=Release -f net6.0
Compress-Archive -Force -Path .\Pivet\bin\Release\net6.0\linux-x64\* -DestinationPath ".\build\linux-self-contained-$($hash).zip"

dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=WindowsSelfContained /p:Configuration=Release -f net6.0
Compress-Archive -Force -Path .\Pivet\bin\Release\net6.0\win10-x64\* -DestinationPath ".\build\windows-self-contained-$($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"
dotnet publish .\Pivet\Pivet.csproj /p:PublishProfile=RedHatSelfContained /p:Configuration=Release -f net6.0
Compress-Archive -Force -Path .\Pivet\bin\Release\net6.0\rhel-x64\* -DestinationPath ".\build\redhat-self-contained-$($hash).zip"

0 comments on commit f548f4d

Please sign in to comment.