v8.1 #47

Merged
danieljsummers merged 4 commits from v8.1 into main 2023-07-05 00:03:43 +00:00
9 changed files with 35 additions and 17 deletions
Showing only changes of commit 622ed0b3fc - Show all commits

View File

@ -26,7 +26,7 @@ Target.create "Test" (fun _ ->
let testPath = $"{projPath}.Tests"
DotNet.build (fun opts -> { opts with NoLogo = true }) $"{testPath}/PrayerTracker.Tests.fsproj"
Expecto.run
(fun opts -> { opts with WorkingDirectory = $"{testPath}/bin/Release/net6.0" })
(fun opts -> { opts with WorkingDirectory = $"{testPath}/bin/Release/net7.0" })
[ "PrayerTracker.Tests.dll" ])
Target.create "Publish" (fun _ ->

View File

@ -1,11 +1,11 @@
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<TargetFramework>net7.0</TargetFramework>
<AssemblyVersion>8.1.0.0</AssemblyVersion>
<FileVersion>8.1.0.0</FileVersion>
<Authors>danieljsummers</Authors>
<Company>Bit Badger Solutions</Company>
<Version>8.0.0</Version>
<Version>8.1.0</Version>
<DebugType>Embedded</DebugType>
</PropertyGroup>
</Project>

25
src/Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build
WORKDIR /pt
COPY ./PrayerTracker.sln ./
COPY ./Directory.Build.props ./
COPY ./PrayerTracker/PrayerTracker.fsproj ./PrayerTracker/
COPY ./PrayerTracker.Data/PrayerTracker.Data.fsproj ./PrayerTracker.Data/
COPY ./PrayerTracker.Tests/PrayerTracker.Tests.fsproj ./PrayerTracker.Tests/
COPY ./PrayerTracker.UI/PrayerTracker.UI.fsproj ./PrayerTracker.UI/
RUN dotnet restore
COPY . ./
WORKDIR /pt/PrayerTracker.Tests
RUN dotnet run
WORKDIR /pt/PrayerTracker
RUN dotnet publish -c Release -r linux-x64
FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine as final
WORKDIR /app
RUN apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
COPY --from=build /pt/PrayerTracker/bin/Release/net7.0/linux-x64/publish/ ./
EXPOSE 80
CMD [ "dotnet", "/app/PrayerTracker.dll" ]

View File

@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Entities.fs" />
<Compile Include="Access.fs" />

View File

@ -2,7 +2,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@ -650,7 +650,7 @@ let requestListTests =
}
let text = textList.AsText _s
let expected =
textList.Requests[0].UpdatedDate.InUtc().Date.ToString ("d", null)
textList.Requests[0].UpdatedDate.InZone(SmallGroup.timeZone reqList.SmallGroup).Date.ToString ("d", null)
|> sprintf " + Zeb - zyx (as of %s)"
// spot check; if one request has it, they all should
Expect.stringContains text expected "Expected short as-of date not found"
@ -665,7 +665,7 @@ let requestListTests =
}
let text = textList.AsText _s
let expected =
textList.Requests[0].UpdatedDate.InUtc().Date.ToString ("D", null)
textList.Requests[0].UpdatedDate.InZone(SmallGroup.timeZone reqList.SmallGroup).Date.ToString ("D", null)
|> sprintf " + Zeb - zyx (as of %s)"
// spot check; if one request has it, they all should
Expect.stringContains text expected "Expected long as-of date not found"

View File

@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Utils.fs" />
<Compile Include="ViewModels.fs" />

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<PublishSingleFile>True</PublishSingleFile>
<PublishSingleFile>False</PublishSingleFile>
<SelfContained>False</SelfContained>
</PropertyGroup>

View File

@ -9,6 +9,8 @@ open PrayerTracker.Data
open PrayerTracker.Entities
open PrayerTracker.ViewModels
#nowarn "44" // The default Rfc2898DeriveBytes is used to identify passwords to be upgraded
/// Password hashing implementation extending ASP.NET Core's identity implementation
[<AutoOpen>]
module Hashing =