Skip to content

Commit

Permalink
Updated to .NET 5 and deprecated serilog packages
Browse files Browse the repository at this point in the history
  • Loading branch information
i8beef committed Dec 13, 2020
1 parent 2f217d8 commit 2e0d003
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ build_script:
dotnet publish -c Release src/HomeAutio.Mqtt.Harmony.sln
artifacts:
- path: src\HomeAutio.Mqtt.Harmony\bin\$(configuration)\netcoreapp3.1\publish
- path: src\HomeAutio.Mqtt.Harmony\bin\$(configuration)\net5.0\publish
name: HomeAutio.Mqtt.Harmony-$(appveyor_build_version)
deploy:
- provider: GitHub
auth_token: $(GITHUB_API_KEY)
artifact: src\HomeAutio.Mqtt.Harmony\bin\$(configuration)\netcoreapp3.1\HomeAutio.Mqtt.Harmony-$(appveyor_build_version).zip
artifact: src\HomeAutio.Mqtt.Harmony\bin\$(configuration)\net5.0\HomeAutio.Mqtt.Harmony-$(appveyor_build_version).zip
4 changes: 2 additions & 2 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
WORKDIR /app

# copy csproj and restore as distinct layers
Expand All @@ -17,7 +17,7 @@ WORKDIR /app/HomeAutio.Mqtt.Harmony
RUN dotnet publish -o out

# build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine AS runtime
FROM mcr.microsoft.com/dotnet/runtime:5.0-alpine AS runtime
WORKDIR /app
COPY --from=publish /app/HomeAutio.Mqtt.Harmony/out ./

Expand Down
4 changes: 2 additions & 2 deletions src/Dockerfile.arm32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
WORKDIR /app

# copy csproj and restore as distinct layers
Expand All @@ -17,7 +17,7 @@ WORKDIR /app/HomeAutio.Mqtt.Harmony
RUN dotnet publish -o out

# build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim-arm32v7 AS runtime
FROM mcr.microsoft.com/dotnet/runtime:5.0-buster-slim-arm32v7 AS runtime
WORKDIR /app
COPY --from=publish /app/HomeAutio.Mqtt.Harmony/out ./

Expand Down
12 changes: 6 additions & 6 deletions src/HomeAutio.Mqtt.Harmony/HomeAutio.Mqtt.Harmony.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<PackageProjectUrl>https://github.com/i8beef/HomeAutio.Mqtt.Harmony</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/i8beef/HomeAutio.Mqtt.Harmony/blob/master/LICENSE</PackageLicenseUrl>
<Company></Company>
<Product>HomeAutio.Mqtt.Harmony</Product>
<Version>1.0.0.0</Version>
<PackageId>HomeAutio.Mqtt.Harmony</PackageId>
<Authors>Michael Hallock</Authors>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -34,13 +34,13 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="HarmonyHub" Version="3.0.0.12" />
<PackageReference Include="HomeAutio.Mqtt.Core" Version="3.0.0.59" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.5" />
<PackageReference Include="HomeAutio.Mqtt.Core" Version="3.0.0.65" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
</ItemGroup>

</Project>
5 changes: 3 additions & 2 deletions src/HomeAutio.Mqtt.Harmony/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
"WriteTo": [
{ "Name": "Console" },
{
"Name": "RollingFile",
"Name": "File",
"Args": {
"pathFormat": "logs/HomeAutio.Mqtt.Harmony.log",
"path": "logs/HomeAutio.Mqtt.Harmony.log",
"rollingInterval": "Day",
"retainedFileCountLimit": 31
}
}
Expand Down

0 comments on commit 2e0d003

Please sign in to comment.