Browse Source

fix build using latest dotnet sdk

pull/2832/head
Jason Dove 5 months ago
parent
commit
981b6f6e24
No known key found for this signature in database
  1. 6
      .github/workflows/artifacts.yml
  2. 8
      .github/workflows/pr.yml
  3. 2
      ErsatzTV.Application/ErsatzTV.Application.csproj
  4. 4
      ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs
  5. 2
      ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj
  6. 2
      ErsatzTV.Core/ErsatzTV.Core.csproj
  7. 2
      ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs
  8. 2
      ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj
  9. 2
      ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj
  10. 7
      ErsatzTV.Infrastructure/Data/DbInitializer.cs
  11. 2
      ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj
  12. 4
      ErsatzTV.Infrastructure/Metadata/LanguageCodeCache.cs
  13. 2
      ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj
  14. 1
      ErsatzTV.Scanner/ErsatzTV.Scanner.csproj
  15. 2
      ErsatzTV/ErsatzTV.csproj
  16. 2
      docker/Dockerfile
  17. 2
      docker/arm32v7/Dockerfile
  18. 2
      docker/arm64/Dockerfile

6
.github/workflows/artifacts.yml

@ -57,7 +57,7 @@ jobs: @@ -57,7 +57,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.102'
dotnet-version: '10.0.x'
- name: Clean
run: dotnet clean --configuration Release && dotnet nuget locals all --clear
@ -172,7 +172,7 @@ jobs: @@ -172,7 +172,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.102'
dotnet-version: '10.0.x'
- name: Clean
run: dotnet clean --configuration Release && dotnet nuget locals all --clear
@ -229,7 +229,7 @@ jobs: @@ -229,7 +229,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.102'
dotnet-version: '10.0.x'
- name: Clean
run: dotnet clean --configuration Release && dotnet nuget locals all --clear

8
.github/workflows/pr.yml

@ -14,7 +14,7 @@ jobs: @@ -14,7 +14,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.102'
dotnet-version: '10.0.x'
- name: Clean
run: dotnet clean --configuration Release && dotnet nuget locals all --clear
@ -36,7 +36,7 @@ jobs: @@ -36,7 +36,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.102'
dotnet-version: '10.0.x'
- name: Clean
run: dotnet clean --configuration Release && dotnet nuget locals all --clear
@ -72,7 +72,7 @@ jobs: @@ -72,7 +72,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.102'
dotnet-version: '10.0.x'
- name: Clean
run: dotnet clean --configuration Release && dotnet nuget locals all --clear
@ -100,7 +100,7 @@ jobs: @@ -100,7 +100,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.102'
dotnet-version: '10.0.x'
- name: Clean
run: dotnet clean --configuration Release && dotnet nuget locals all --clear

2
ErsatzTV.Application/ErsatzTV.Application.csproj

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<NoWarn>VSTHRD200</NoWarn>
<NoWarn>VSTHRD200,CA1873</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>latest-Recommended</AnalysisLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

4
ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs

@ -498,7 +498,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler< @@ -498,7 +498,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
Option<TimeSpan> maybeDuration = maybeNextStart.Map(s => s - now);
// limit working ahead on errors to 1 minute
if (!request.HlsRealtime && maybeDuration.IfNone(TimeSpan.FromMinutes(2)) > TimeSpan.FromMinutes(1))
if (!request.HlsRealtime && await maybeDuration.IfNoneAsync(TimeSpan.FromMinutes(2)) > TimeSpan.FromMinutes(1))
{
maybeNextStart = now.AddMinutes(1);
maybeDuration = TimeSpan.FromMinutes(1);
@ -766,7 +766,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler< @@ -766,7 +766,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
.ToListAsync(cancellationToken);
// always play min(duration to next item, version.Duration)
TimeSpan duration = maybeDuration.IfNone(version.Duration);
TimeSpan duration = await maybeDuration.IfNoneAsync(version.Duration);
if (version.Duration < duration)
{
duration = version.Duration;

2
ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csproj

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<NoWarn>VSTHRD200</NoWarn>
<NoWarn>VSTHRD200,CA1873</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

2
ErsatzTV.Core/ErsatzTV.Core.csproj

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<NoWarn>VSTHRD200</NoWarn>
<NoWarn>VSTHRD200,CA1873</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>latest-Recommended</AnalysisLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

2
ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

@ -893,7 +893,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService @@ -893,7 +893,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
playbackSettings.NormalizeColors,
playbackSettings.Deinterlace);
var frameRate = playbackSettings.FrameRate.IfNone(new FrameRate("24"));
var frameRate = await playbackSettings.FrameRate.IfNoneAsync(new FrameRate("24"));
var ffmpegVideoStream = new VideoStream(
0,

2
ErsatzTV.FFmpeg/ErsatzTV.FFmpeg.csproj

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<AnalysisLevel>latest-Recommended</AnalysisLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>VSTHRD200</NoWarn>
<NoWarn>VSTHRD200,CA1873</NoWarn>
</PropertyGroup>
<ItemGroup>

2
ErsatzTV.Infrastructure.Tests/ErsatzTV.Infrastructure.Tests.csproj

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoWarn>VSTHRD200</NoWarn>
<NoWarn>VSTHRD200,CA1873</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>

7
ErsatzTV.Infrastructure/Data/DbInitializer.cs

@ -48,10 +48,8 @@ public static class DbInitializer @@ -48,10 +48,8 @@ public static class DbInitializer
if (resource != null)
{
using var reader = new StreamReader(resource);
while (!reader.EndOfStream)
{
string line = await reader.ReadLineAsync(cancellationToken);
if (line != null)
string line;
while ((line = await reader.ReadLineAsync(cancellationToken)) is not null)
{
string[] split = line.Split("|");
if (split.Length == 5)
@ -70,7 +68,6 @@ public static class DbInitializer @@ -70,7 +68,6 @@ public static class DbInitializer
}
}
}
}
await context.SaveChangesAsync(cancellationToken);
}

2
ErsatzTV.Infrastructure/ErsatzTV.Infrastructure.csproj

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<NoWarn>VSTHRD200</NoWarn>
<NoWarn>VSTHRD200,CA1873</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>latest-Recommended</AnalysisLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

4
ErsatzTV.Infrastructure/Metadata/LanguageCodeCache.cs

@ -21,9 +21,9 @@ public class LanguageCodeCache : ILanguageCodeCache @@ -21,9 +21,9 @@ public class LanguageCodeCache : ILanguageCodeCache
if (resource != null)
{
using var reader = new StreamReader(resource);
while (!reader.EndOfStream)
string line;
while ((line = await reader.ReadLineAsync(cancellationToken)) is not null)
{
string line = await reader.ReadLineAsync(cancellationToken);
if (string.IsNullOrWhiteSpace(line))
{
continue;

2
ErsatzTV.Scanner.Tests/ErsatzTV.Scanner.Tests.csproj

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoWarn>VSTHRD200,CA1873</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>

1
ErsatzTV.Scanner/ErsatzTV.Scanner.csproj

@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
<UserSecretsId>729e6271-c307-43c8-8e36-1b36c39f6de2</UserSecretsId>
<AnalysisLevel>latest-Recommended</AnalysisLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>VSTHRD200,CA1873</NoWarn>
</PropertyGroup>
<ItemGroup>

2
ErsatzTV/ErsatzTV.csproj

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>VSTHRD200</NoWarn>
<NoWarn>VSTHRD200,CA1873</NoWarn>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<Configurations>Debug;Release;Debug No Sync</Configurations>
<Platforms>AnyCPU</Platforms>

2
docker/Dockerfile

@ -9,7 +9,7 @@ RUN apt-get update && \ @@ -9,7 +9,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:10.0.102-noble-amd64 AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble-amd64 AS build
RUN apt-get update && apt-get install -y ca-certificates gnupg default-jre-headless python3-pip
WORKDIR /source

2
docker/arm32v7/Dockerfile

@ -4,7 +4,7 @@ FROM --platform=linux/arm/v7 ghcr.io/ersatztv/ersatztv-ffmpeg:7.1.1 AS runtime-b @@ -4,7 +4,7 @@ FROM --platform=linux/arm/v7 ghcr.io/ersatztv/ersatztv-ffmpeg:7.1.1 AS runtime-b
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:10.0.102-noble-amd64 AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble-amd64 AS build
RUN apt-get update && apt-get install -y ca-certificates gnupg
WORKDIR /source

2
docker/arm64/Dockerfile

@ -4,7 +4,7 @@ FROM --platform=linux/arm64 ghcr.io/ersatztv/ersatztv-ffmpeg:7.1.1 AS runtime-ba @@ -4,7 +4,7 @@ FROM --platform=linux/arm64 ghcr.io/ersatztv/ersatztv-ffmpeg:7.1.1 AS runtime-ba
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:10.0.102-noble-arm64v8 AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble-arm64v8 AS build
RUN apt-get update && apt-get install -y ca-certificates gnupg
WORKDIR /source

Loading…
Cancel
Save