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

feat: upgraded to .net v8 #3

Merged
merged 4 commits into from
Jun 10, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
steps:
- name: Checkout reference commit
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Checkout master
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
Expand All @@ -53,13 +53,13 @@ jobs:
with:
node-version: '16.13.0'

- name: Setup .NET 5/6/7
uses: actions/setup-dotnet@v3
- name: Setup .NET 6/7/8
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x

- name: Configure NuGet
uses: nuget/setup-nuget@v1
Expand All @@ -81,7 +81,7 @@ jobs:
dotnet publish \
-o ${{ env.BINARIES_OUTPUT }} \
-c ${{ env.CONFIG }} \
-f net7.0 \
-f net8.0 \
--no-build \
--no-restore

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -41,7 +41,7 @@ jobs:

echo "branch=$branch_check" >> $GITHUB_ENV

- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout tag branch
with:
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
steps:
- name: Checkout reference commit
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Checkout master
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
Expand All @@ -49,13 +49,13 @@ jobs:
with:
node-version: '16.13.0'

- name: Setup .NET 5/6/7
uses: actions/setup-dotnet@v3
- name: Setup .NET 6/7/8
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x

- name: Configure NuGet
uses: nuget/setup-nuget@v1
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout commit
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/download-artifact@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout master
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout master
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
Expand Down
11 changes: 8 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<!-- Project Setup -->

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<NoWarn>1591;1701;1702;8032;NU1701;AD0001;CA1041;CS0311;CS5001</NoWarn>
<NoWarn>1591;1701;1702;8032;NU1701;NU1902;AD0001;CA1041;CS0311;CS5001</NoWarn>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Deterministic>true</Deterministic>
<BuildInParallel>false</BuildInParallel>
Expand All @@ -31,6 +31,11 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
Expand All @@ -54,7 +59,7 @@
</PropertyGroup>

<!-- Source Link -->
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<ContentTargetFolders>.</ContentTargetFolders>
<PackageId>Cogworks.AzureSearch.IoC.Umbraco</PackageId>
<Title>Cogworks.AzureSearch.IoC.Umbraco</Title>
<Description>An Umbraco extension to Cogworks.AzureSearch.</Description>
<Product>An Umbraco 9, 10, 11 extension to Cogworks.AzureSearch</Product>
<Description>An Umbraco 10+ extension to Cogworks.AzureSearch.</Description>
<Product>An Umbraco 10+ extension to Cogworks.AzureSearch</Product>
<PackageTags>Azure Search Umbraco container IoC</PackageTags>
<Version></Version>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
Expand All @@ -15,18 +15,18 @@
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[13.0.0,)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,)" />
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,12.99.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[10.0.0, 11.0.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[9.0.0, 10.0.0)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Search.Documents" Version="11.2.0" />
<PackageReference Include="Cogworks.AzureSearch" Version="1.0.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<NoWarn>1591;1701;1702;8032;NU1701;AD0001;CA1041;CS0311;CS5001</NoWarn>
<NoWarn>1591;1701;1702;8032;NU1701;NU1902;AD0001;CA1041;CS0311;CS5001</NoWarn>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Deterministic>true</Deterministic>
<BuildInParallel>false</BuildInParallel>
Expand All @@ -21,6 +21,11 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net7.0'">
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
Expand All @@ -35,18 +40,19 @@
<ProjectReference Include="..\..\..\src\Cogworks.AzureSearch.IoC.Umbraco\Cogworks.AzureSearch.IoC.Umbraco.csproj"/>
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[13.0.0,)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,)"/>
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,12.99.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[10.0.0, 11.0.0)"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Umbraco.Cms.Core" Version="[9.0.0, 10.0.0)"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.17.0"/>
<PackageReference Include="DotLiquid" Version="2.2.595"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ public class UmbracoIocExtensionTests
public UmbracoIocExtensionTests()
{
_serviceCollection = new ServiceCollection();
var dirName = Path.GetDirectoryName(
Assembly.GetExecutingAssembly()
.Location
.Replace("bin\\Debug", string.Empty));

var typeLoader =
#if NET6_0_OR_GREATER || NET7_0
#if NET6_0_OR_GREATER || NET7_0 || NET8_0
new TypeLoader(
Substitute.For<ITypeFinder>(),
Substitute.For<ILogger<TypeLoader>>());
#else
var dirName = Path.GetDirectoryName(
Assembly.GetExecutingAssembly()
.Location
.Replace("bin\\Debug", string.Empty));
new TypeLoader(
Substitute.For<ITypeFinder>(),
new VaryingRuntimeHash(),
Expand Down
Loading