Skip to content

Commit

Permalink
Dotnet 8 upgrade (#37)
Browse files Browse the repository at this point in the history
* upgrade to dotnet 8

* update workflow

* update docs
  • Loading branch information
jpsingleton authored Nov 7, 2024
1 parent dcb72ce commit e64d86f
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions Huxley2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
Expand All @@ -16,7 +16,7 @@ RUN dotnet publish -c Release -o out \


# Build runtime image
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0-alpine
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["./Huxley2"]
4 changes: 2 additions & 2 deletions Huxley2/Huxley2.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>51de7d1a-2f59-4a62-880b-89b08cc57a86</UserSecretsId>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
<AssemblyName>Huxley2</AssemblyName>
<Version>2.0.5</Version>
<Version>2.0.6</Version>
<Copyright>© James Singleton</Copyright>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Huxley2/Pages/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
<abbr title="Application Programming Interface">API</abbr>
(called <a href="https://www.nationalrail.co.uk/100296.aspx">Darwin</a>).
It supports both the Public Version (PV) and the Staff Version (SV).
It's built with ASP.NET Core <abbr title="Long Term Support">LTS</abbr> (.NET 6.0), C# 10 and lots of
abbreviations!
It's built with ASP.NET Core <abbr title="Long Term Support">LTS</abbr> (.NET 8.0),
C# 10 and lots of abbreviations!
</p>
<p>
The primary purpose of Huxley 2 is to allow easy use of the LDB API from browser-based
Expand Down Expand Up @@ -197,7 +197,7 @@
You can now use Huxley on any platform (pun intended)
</li>
<li>
.NET 6.0 LTS supported until 2024-11-08
.NET 8.0 LTS supported until 2026-11-10
</li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion Huxley2/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Startup(IConfiguration config)
public static void ConfigureServices(IServiceCollection services)
{
// Shouldn't be a security issue as plaintext isn't chosen by the user and we aren't using auth or sessions
// https://docs.microsoft.com/en-us/aspnet/core/performance/response-compression?view=aspnetcore-6.0#compression-with-secure-protocol
// https://docs.microsoft.com/en-us/aspnet/core/performance/response-compression?view=aspnetcore-8.0
services.AddResponseCompression(options =>
{
options.EnableForHttps = true;
Expand Down
2 changes: 1 addition & 1 deletion Huxley2Tests/Huxley2Tests.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>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _Note:_ Huxley 2 is considered feature-complete and will only be updated to fix

## About

Huxley 2 is a CORS enabled cross-platform JSON ReST proxy for the GB NRE LDB WCF SOAP XML API (called Darwin). It supports both the Public Version (PV) and the Staff Version (SV). It's built with ASP.NET Core LTS (.NET 6.0), C# 10 and lots of abbreviations!
Huxley 2 is a CORS enabled cross-platform JSON ReST proxy for the GB NRE LDB WCF SOAP XML API (called Darwin). It supports both the Public Version (PV) and the Staff Version (SV). It's built with ASP.NET Core LTS (.NET 8.0), C# 10 and lots of abbreviations!

The primary purpose of Huxley 2 is to allow easy use of the LDB API from browser-based client-side PWAs made with JavaScript or TypeScript. Additionally, it opens up the Windows enterprise API to agile developers on macOS and Linux.

Expand Down Expand Up @@ -44,7 +44,7 @@ To rebuild use `docker-compose build` or `docker-compose up --build`.

If you want to run the container in the background you can run `docker-compose up --detach`

If you would like the docker container to _reboot upon restart_ on the host machine you can uncomment `restart: always` in the docker-compose.yml file and make sure the docker service is set to start upon bootup.
If you would like the docker container to _reboot upon restart_ on the host machine you can uncomment `restart: always` in the docker-compose.yml file and make sure the docker service is set to start upon bootup.

## Station Codes File

Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ stages:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
displayName: "Use .NET 6.0 SDK"
displayName: "Use .NET 8.0 SDK"
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
inputs:
packageType: 'sdk'
version: '6.0.x'
version: '8.0.x'
- task: DotNetCoreCLI@2
displayName: "Build Huxley 2"
env:
Expand Down Expand Up @@ -65,4 +65,4 @@ stages:
appType: 'webAppLinux'
WebAppName: 'huxley2'
packageForLinux: '$(Build.ArtifactStagingDirectory)/**/Huxley2.zip'
RuntimeStack: 'DOTNETCORE|6.0'
RuntimeStack: 'DOTNETCORE|8.0'

0 comments on commit e64d86f

Please sign in to comment.