Skip to content

Commit e307223

Browse files
Feature/cms13 upgrade (#187)
- upgrade to cms 13.1 and commerce 15 - ci: remove SonarQube scanner from build.yml, add build + test steps - ci: add System.Text.Json custom note to GitHub release in release.yml - docs: update README badges (.NET 10, Optimizely 13, drop Sonar badge) - docs: add 7.0.0 CHANGELOG entry in keepachangelog format
1 parent b65535a commit e307223

24 files changed

Lines changed: 164 additions & 128 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ jobs:
1414
name: Build
1515
runs-on: windows-latest
1616
steps:
17-
- name: Set up JDK 11
18-
uses: actions/setup-java@v4
19-
with:
20-
java-version: 11
21-
distribution: 'temurin'
22-
2317
- name: Checkout repository with submodules
2418
uses: actions/checkout@v4
2519
with:
@@ -32,38 +26,9 @@ jobs:
3226
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
3327
restore-keys: |
3428
${{ runner.os }}-nuget-
35-
- name: Cache SonarCloud packages
36-
uses: actions/cache@v4
37-
with:
38-
path: ~\sonar\cache
39-
key: ${{ runner.os }}-sonar
40-
restore-keys: ${{ runner.os }}-sonar
41-
42-
- name: Cache SonarCloud scanner
43-
id: cache-sonar-scanner
44-
uses: actions/cache@v4
45-
with:
46-
path: .\.sonar\scanner
47-
key: ${{ runner.os }}-sonar-scanner
48-
restore-keys: ${{ runner.os }}-sonar-scanner
49-
50-
- name: Install SonarCloud scanner
51-
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
52-
shell: powershell
53-
run: |
54-
New-Item -Path .\.sonar\scanner -ItemType Directory
55-
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
56-
5729
- name: Restore dependencies
5830
run: dotnet restore
59-
60-
- name: Build and analyze
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
64-
shell: powershell
65-
run: |
66-
.\.sonar\scanner\dotnet-sonarscanner begin /k:"Geta_${{ github.event.repository.name }}" /o:"geta" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths=**/**/coverage.opencover.xml
67-
dotnet build
68-
dotnet test --filter Category!=Integration /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=coverage
69-
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
31+
- name: Build
32+
run: dotnet build --configuration Release --no-restore
33+
- name: Test
34+
run: dotnet test --configuration Release --no-build

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ jobs:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5353
- name: Create GitHub Release with Auto-Generated Notes
5454
run: |
55-
gh release create ${{ github.ref_name }} --generate-notes
55+
$notes = @"
56+
## Release notes
57+
58+
- Removed the explicit ``System.Text.Json`` package reference. It now comes as a transitive dependency from Optimizely, so it no longer needs to be declared in the package.
59+
"@
60+
gh release create ${{ github.ref_name }} --notes "$notes" --generate-notes
5661
env:
5762
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5863
- name: Loop through all .nupkg files in the current directory and upload them to the release

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,5 @@ FakesAssemblies/
198198

199199
# Rider
200200
*/.idea/*
201-
.idea/*
201+
.idea/*
202+
/.claude

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [7.0.0] - 2026-06-01
6+
7+
### Changed
8+
9+
- Upgraded target framework to .NET 10.
10+
- Upgraded to Optimizely CMS 13 (`EPiServer.CMS.UI.Core` 13) and Optimizely Commerce 15.
11+
- Bumped `Microsoft.Data.SqlClient` to 6.1.5.
12+
- Replaced `Newtonsoft.Json` with `System.Text.Json` for content URL history serialization in `SqlContentUrlHistoryRepository`. `System.Text.Json` is provided transitively by Optimizely, so no explicit package reference is added.
13+
14+
### Fixed
15+
16+
- `Geta.NotFoundHandler.Optimizely` now registers its Optimizely Shell module when the package is referenced transitively (for example when only `Geta.NotFoundHandler.Optimizely.Commerce` is installed). The `module.config` copy target is now shipped under `buildTransitive`, fixing the "Unable to find a module by assembly 'Geta.NotFoundHandler.Optimizely'" error in the admin UI.
17+
518
## [1.1.0]
619

720
- Refctoring

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
# NotFound Handler for ASP.NET Core and Optimizely
33

44
[![Build](https://github.com/Geta/geta-notfoundhandler/actions/workflows/build.yml/badge.svg)](https://github.com/Geta/geta-notfoundhandler/actions/workflows/build.yml)
5-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Geta_geta-notfoundhandler&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Geta_geta-notfoundhandler)
6-
[![Platform](https://img.shields.io/badge/Platform-.NET%205-blue.svg?style=flat)](https://docs.microsoft.com/en-us/dotnet/)
7-
[![Platform](https://img.shields.io/badge/Optimizely-%2012-orange.svg?style=flat)](http://world.episerver.com/cms/)
5+
[![Platform](https://img.shields.io/badge/Platform-.NET%2010-blue.svg?style=flat)](https://docs.microsoft.com/en-us/dotnet/)
6+
[![Platform](https://img.shields.io/badge/Optimizely-%2013-orange.svg?style=flat)](http://world.episerver.com/cms/)
87

98
## Description
109

src/Geta.NotFoundHandler.Admin/Geta.NotFoundHandler.Admin.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
66
<PackageId>Geta.NotFoundHandler.Admin</PackageId>
77
<Title>Admin UI for NotFound Handler for ASP.NET Core and EPiServer</Title>

src/Geta.NotFoundHandler.Optimizely.Commerce/Geta.NotFoundHandler.Optimizely.Commerce.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<PackageId>Geta.NotFoundHandler.Optimizely.Commerce</PackageId>
66
<Title>NotFound handler Admin UI integration Optimizely Commerce</Title>
77
<Authors>Geta Digital</Authors>
@@ -30,7 +30,9 @@
3030
</ItemGroup>
3131

3232
<ItemGroup>
33-
<PackageReference Include="EPiServer.Commerce.Core" Version="14.3.1" />
33+
<PackageReference Include="EPiServer.Commerce.Core" Version="15.0.0" />
34+
<PackageReference Include="MailKit" Version="4.16.0" />
35+
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.7" />
3436
</ItemGroup>
3537

3638
</Project>

src/Geta.NotFoundHandler.Optimizely/Core/AutomaticRedirects/CmsContentLinkProvider.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@
44
using System.Collections.Generic;
55
using System.Linq;
66
using EPiServer;
7+
using EPiServer.Applications;
78
using EPiServer.Core;
8-
using EPiServer.Web;
99

1010
namespace Geta.NotFoundHandler.Optimizely.Core.AutomaticRedirects
1111
{
1212
public class CmsContentLinkProvider : IContentLinkProvider
1313
{
14-
private readonly ISiteDefinitionRepository _siteDefinitionRepository;
14+
private readonly IApplicationRepository _applicationRepository;
1515
private readonly IContentLoader _contentLoader;
1616

17-
public CmsContentLinkProvider(ISiteDefinitionRepository siteDefinitionRepository, IContentLoader contentLoader)
17+
public CmsContentLinkProvider(IApplicationRepository applicationRepository, IContentLoader contentLoader)
1818
{
19-
_siteDefinitionRepository = siteDefinitionRepository;
19+
_applicationRepository = applicationRepository;
2020
_contentLoader = contentLoader;
2121
}
2222

2323
public IEnumerable<ContentReference> GetAllLinks()
2424
{
25-
var allSites = _siteDefinitionRepository.List();
26-
return allSites.SelectMany(site => _contentLoader.GetDescendents(site.StartPage));
25+
return _applicationRepository.List()
26+
.OfType<IRoutableApplication>()
27+
.SelectMany(app => _contentLoader.GetDescendents(app.EntryPoint));
2728
}
2829
}
2930
}

src/Geta.NotFoundHandler.Optimizely/Core/AutomaticRedirects/IndexContentUrlsJob.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33

44
using System;
55
using System.Linq;
6-
using EPiServer.PlugIn;
76
using EPiServer.Scheduler;
87
using Geta.NotFoundHandler.Optimizely.Infrastructure;
98

109
namespace Geta.NotFoundHandler.Optimizely.Core.AutomaticRedirects
1110
{
12-
[ScheduledPlugIn(DisplayName = "[Geta NotFoundHandler] Index content URLs",
13-
GUID = "53C743AE-E152-497A-A7E5-7E30F4B5B321",
14-
SortIndex = 5555)]
11+
[ScheduledJob(DisplayName = "[Geta NotFoundHandler] Index content URLs",
12+
GUID = "53C743AE-E152-497A-A7E5-7E30F4B5B321")]
1513
public class IndexContentUrlsJob : ScheduledJobBase
1614
{
1715
private bool _stopped;

src/Geta.NotFoundHandler.Optimizely/Core/AutomaticRedirects/RegisterMovedContentRedirectsJob.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33

44
using System;
55
using System.Linq;
6-
using EPiServer.PlugIn;
76
using EPiServer.Scheduler;
87
using Geta.NotFoundHandler.Optimizely.Infrastructure;
98

109
namespace Geta.NotFoundHandler.Optimizely.Core.AutomaticRedirects
1110
{
12-
[ScheduledPlugIn(DisplayName = "[Geta NotFoundHandler] Register content move redirects",
13-
GUID = "EC96ABEE-5DA4-404F-A0C8-451C77CA4983",
14-
SortIndex = 5555)]
11+
[ScheduledJob(DisplayName = "[Geta NotFoundHandler] Register content move redirects",
12+
GUID = "EC96ABEE-5DA4-404F-A0C8-451C77CA4983")]
1513
public class RegisterMovedContentRedirectsJob : ScheduledJobBase
1614
{
1715
private readonly IContentUrlHistoryLoader _contentUrlHistoryLoader;

0 commit comments

Comments
 (0)