Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added .NET 8 #96

Merged
merged 4 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.*
Expand All @@ -63,6 +66,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.*
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.*
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.*
Expand All @@ -55,6 +58,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.*
Expand Down
12 changes: 6 additions & 6 deletions AvroSchemaGenerator.Tests/AvroSchemaGenerator.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="apache.avro" Version="1.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="apache.avro" Version="1.11.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
5 changes: 5 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant
to clarify expected behavior in our community.
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
4 changes: 2 additions & 2 deletions SchemaGenerator/AvroSchemaGenerator.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net7.0;net8.0</TargetFrameworks>
<PackageProjectUrl>https://github.com/eaba/SchemaGenerator</PackageProjectUrl>
<RepositoryUrl>https://github.com/eaba/SchemaGenerator</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand All @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
:; exit $?

@ECHO OFF
powershell -ExecutionPolicy ByPass -NoProfile "%~dp0build.ps1" %*
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*
13 changes: 9 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $TempDirectory = "$PSScriptRoot\\.nuke\temp"

$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
$DotNetChannel = "Current"
$DotNetChannel = "STS"

$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
Expand Down Expand Up @@ -56,14 +56,19 @@ else {
# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
}

Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"

if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
}

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
9 changes: 7 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"

DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
DOTNET_CHANNEL="Current"
DOTNET_CHANNEL="STS"

export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
Expand Down Expand Up @@ -56,7 +56,12 @@ else
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
fi

echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)"
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"

if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "NUKE_ENTERPRISE_TOKEN" != "" ]]; then
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
fi

"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
2 changes: 1 addition & 1 deletion build/Build.CI.GitHubActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
try
{
var newSteps = new List<GitHubActionsStep>(job.Steps);
foreach (var version in new[] { "7.0.*" })
foreach (var version in new[] { "7.0.*", "8.0.*" })
{
newSteps.Insert(1, new GitHubActionsSetupDotNetStep
{
Expand All @@ -71,7 +71,7 @@

job.Steps = newSteps.ToArray();
}
catch (Exception ex)

Check warning on line 74 in build/Build.CI.GitHubActions.cs

View workflow job for this annotation

GitHub Actions / windows-latest

The variable 'ex' is declared but never used

Check warning on line 74 in build/Build.CI.GitHubActions.cs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

The variable 'ex' is declared but never used

Check warning on line 74 in build/Build.CI.GitHubActions.cs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

The variable 'ex' is declared but never used

Check warning on line 74 in build/Build.CI.GitHubActions.cs

View workflow job for this annotation

GitHub Actions / windows-latest

The variable 'ex' is declared but never used
{

}
Expand All @@ -98,7 +98,7 @@
}
}
}
catch (Exception ex)

Check warning on line 101 in build/Build.CI.GitHubActions.cs

View workflow job for this annotation

GitHub Actions / windows-latest

The variable 'ex' is declared but never used

Check warning on line 101 in build/Build.CI.GitHubActions.cs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

The variable 'ex' is declared but never used

Check warning on line 101 in build/Build.CI.GitHubActions.cs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

The variable 'ex' is declared but never used

Check warning on line 101 in build/Build.CI.GitHubActions.cs

View workflow job for this annotation

GitHub Actions / windows-latest

The variable 'ex' is declared but never used
{

}
Expand Down
4 changes: 2 additions & 2 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="7.0.2" />
<PackageDownload Include="GitVersion.Tool" Version="[5.11.1]" />
<PackageReference Include="Nuke.Common" Version="7.0.6" />
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.101",
"version": "8.0.100",
"rollForward": "latestMinor"
}
}
}
Loading