Skip to content

Commit

Permalink
Changes minimum .NET version requirements to .NET 7. Adds .NET 8 support
Browse files Browse the repository at this point in the history
+semver:major
  • Loading branch information
johnkors committed Nov 15, 2023
1 parent 544dd07 commit 80c0f39
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore source
- name: Build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/PreRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.11
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: "5.x"
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.11
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true
- name: Pack
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
dotnet-version: 6.0.x
- run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: "5.x"
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true
- name: Pack
Expand Down
2 changes: 1 addition & 1 deletion source/NoCommons.Tests/NoCommons.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion source/NoCommons/NoCommons.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net46;net45</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0</TargetFrameworks>
<AssemblyName>NoCommons</AssemblyName>
<PackageId>NoCommons</PackageId>
<Authors>John Korsnes</Authors>
Expand Down
8 changes: 2 additions & 6 deletions source/NoCommons/Person/FodselsnummerCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ public static Fodselsnummer GetFodselsnummerForDate(DateTime date)
* @return A List with Fodelsnummer instances
*/
public static List<Fodselsnummer> GetManyFodselsnummerForDate(DateTime date, bool dNumber = false)
{
if (date == null)
{
throw new ArgumentException();
}
{
var century = GetCentury(date);

var dateString = date.ToString("ddMMyy");
Expand Down Expand Up @@ -100,4 +96,4 @@ private static List<Fodselsnummer> SplitByGender(KJONN kjonn, List<Fodselsnummer
}

}
}
}

0 comments on commit 80c0f39

Please sign in to comment.