Skip to content

Commit 6454108

Browse files
authored
Merge pull request #231 from CaptnCodr/feature/update-dependencies
Update dependencies.
2 parents d8b9520 + e22b9eb commit 6454108

24 files changed

+343
-780
lines changed

.config/dotnet-tools.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "7.2.0",
6+
"version": "7.2.1",
77
"commands": [
88
"paket"
99
]
1010
},
1111
"fake-cli": {
12-
"version": "5.23.1",
12+
"version": "6.0.0",
1313
"commands": [
1414
"fake"
1515
]
1616
},
1717
"fsdocs-tool": {
18-
"version": "17.2.0",
18+
"version": "18.1.0",
1919
"commands": [
2020
"fsdocs"
2121
]
2222
},
2323
"fantomas": {
24-
"version": "5.1.5",
24+
"version": "6.0.2",
2525
"commands": [
2626
"fantomas"
2727
]

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [windows-latest, macOS-latest, ubuntu-latest]
18-
dotnet: [7.0.101]
18+
dotnet: [6.0.408]
1919
runs-on: ${{ matrix.os }}
2020

2121
steps:

RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 5.3.0.0 - May 6, 2023
2+
- Remove .NET7 as framework because of incompatibilities.
3+
- Update dependencies.
4+
15
### 5.2.0 - Jan 13, 2023
26
- Align should & throw in xUnit and MsTest. -> (https://github.com/fsprojects/FsUnit/pull/226)
37
- Add .NET7 as TargetFramework.

build.fsx

Lines changed: 50 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#r @"paket:
22
source https://api.nuget.org/v3/index.json
33
framework: net6.0
4-
storage: none
5-
nuget FSharp.Core
4+
nuget FSharp.Core 6.0.0.0
65
nuget Fake.Core.Target
76
nuget Fake.Core.Trace
87
nuget Fake.Core.ReleaseNotes
@@ -67,29 +66,25 @@ let cloneUrl = "[email protected]:fsprojects/FsUnit.git"
6766
let release = ReleaseNotes.load "RELEASE_NOTES.md"
6867

6968
// Helper active pattern for project types
70-
let (|Fsproj|Csproj|Vbproj|) (projFileName:string) =
69+
let (|Fsproj|Csproj|Vbproj|) (projFileName: string) =
7170
match projFileName with
7271
| f when f.EndsWith("fsproj") -> Fsproj
7372
| f when f.EndsWith("csproj") -> Csproj
7473
| f when f.EndsWith("vbproj") -> Vbproj
75-
| _ -> failwith (sprintf "Project file %s not supported. Unknown project type." projFileName)
74+
| _ -> failwith (sprintf "Project file %s not supported. Unknown project type." projFileName)
7675

7776
// Generate assembly info files with the right version & up-to-date information
7877
Target.create "AssemblyInfo" (fun _ ->
7978
let getAssemblyInfoAttributes projectName =
80-
[ AssemblyInfo.Title (projectName)
79+
[ AssemblyInfo.Title(projectName)
8180
AssemblyInfo.Product project
8281
AssemblyInfo.Description summary
8382
AssemblyInfo.Version release.AssemblyVersion
8483
AssemblyInfo.FileVersion release.AssemblyVersion ]
8584

86-
let getProjectDetails (projectPath:string) =
85+
let getProjectDetails (projectPath: string) =
8786
let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath)
88-
( projectPath,
89-
projectName,
90-
Path.GetDirectoryName(projectPath),
91-
(getAssemblyInfoAttributes projectName)
92-
)
87+
(projectPath, projectName, Path.GetDirectoryName(projectPath), (getAssemblyInfoAttributes projectName))
9388

9489
!! "src/**/*.??proj"
9590
|> Seq.filter (fun x -> not <| x.Contains(".netstandard"))
@@ -98,46 +93,39 @@ Target.create "AssemblyInfo" (fun _ ->
9893
match projFileName with
9994
| Fsproj -> AssemblyInfoFile.createFSharp (folderName @@ "AssemblyInfo.fs") attributes
10095
| Csproj -> AssemblyInfoFile.createCSharp ((folderName @@ "Properties") @@ "AssemblyInfo.cs") attributes
101-
| Vbproj -> AssemblyInfoFile.createVisualBasic ((folderName @@ "My Project") @@ "AssemblyInfo.vb") attributes
102-
)
103-
)
96+
| Vbproj -> AssemblyInfoFile.createVisualBasic ((folderName @@ "My Project") @@ "AssemblyInfo.vb") attributes))
10497

10598
// Copies binaries from default VS location to expected bin folder
10699
// But keeps a subdirectory structure for each project in the
107100
// src folder to support multiple project outputs
108101
Target.create "CopyBinaries" (fun _ ->
109102
!! "src/**/*.??proj"
110-
|> Seq.map (fun f -> ((Path.GetDirectoryName f) @@ "bin/Release", "bin" @@ (Path.GetFileNameWithoutExtension f)))
111-
|> Seq.iter (fun (fromDir, toDir) -> Shell.copyDir toDir fromDir (fun _ -> true))
112-
)
103+
|> Seq.map (fun f -> ((Path.GetDirectoryName f) @@ "bin/Release", "bin" @@ (Path.GetFileNameWithoutExtension f)))
104+
|> Seq.iter (fun (fromDir, toDir) -> Shell.copyDir toDir fromDir (fun _ -> true)))
113105

114106
// --------------------------------------------------------------------------------------
115107
// Clean build results
116108

117109
Target.create "Clean" (fun _ ->
118110
Shell.cleanDirs
119-
[
120-
"bin"; "temp";
121-
"src/FsUnit.NUnit/bin/";
122-
"src/FsUnit.NUnit/obj/";
123-
"src/FsUnit.Xunit/bin/";
124-
"src/FsUnit.Xunit/obj/";
125-
"src/FsUnit.MsTestUnit/bin/"
126-
"src/FsUnit.MsTestUnit/obj/"
127-
]
128-
)
129-
130-
Target.create "CleanDocs" (fun _ ->
131-
Shell.cleanDirs ["docs/output"]
132-
)
111+
[ "bin"
112+
"temp"
113+
"src/FsUnit.NUnit/bin/"
114+
"src/FsUnit.NUnit/obj/"
115+
"src/FsUnit.Xunit/bin/"
116+
"src/FsUnit.Xunit/obj/"
117+
"src/FsUnit.MsTestUnit/bin/"
118+
"src/FsUnit.MsTestUnit/obj/" ])
119+
120+
Target.create "CleanDocs" (fun _ -> Shell.cleanDirs [ "docs/output" ])
133121

134122
// --------------------------------------------------------------------------------------
135123
// Check code format & format code using Fantomas
136124

137125
let sourceFiles =
138126
!! "src/**/*.fs"
139-
++ "tests/**/*.fs"
140-
-- "./**/*Assembly*.fs"
127+
++ "tests/**/*.fs"
128+
-- "./**/*Assembly*.fs"
141129

142130
Target.create "CheckFormat" (fun _ ->
143131
let result =
@@ -152,8 +140,7 @@ Target.create "CheckFormat" (fun _ ->
152140
elif result.ExitCode = 99 then
153141
failwith "Some files need formatting, check output for more info"
154142
else
155-
Trace.logf "Errors while formatting: %A" result.Errors
156-
)
143+
Trace.logf "Errors while formatting: %A" result.Errors)
157144

158145
Target.create "Format" (fun _ ->
159146
let result =
@@ -163,62 +150,66 @@ Target.create "Format" (fun _ ->
163150
|> DotNet.exec id "fantomas"
164151

165152
if not result.OK then
166-
printfn "Errors while formatting all files: %A" result.Messages
167-
)
153+
printfn "Errors while formatting all files: %A" result.Messages)
168154

169155
// --------------------------------------------------------------------------------------
170156
// Build library & test project
171157

172158
Target.create "Build" (fun _ ->
173159
let result = DotNet.exec id "build" "FsUnit.sln -c Release"
174-
if not result.OK
175-
then failwithf "Build failed: %A" result.Errors
176-
)
160+
161+
if not result.OK then
162+
failwithf "Build failed: %A" result.Errors)
177163

178164
// --------------------------------------------------------------------------------------
179165
// Run the unit tests using test runner
180166

181167
Target.create "NUnit" (fun _ ->
182-
DotNet.test id "tests/FsUnit.NUnit.Test/"
183-
)
168+
let result = DotNet.exec id "test" "tests/FsUnit.NUnit.Test/"
184169

185-
Target.create "xUnit" (fun _ ->
186-
DotNet.test id "tests/FsUnit.Xunit.Test/"
187-
)
170+
if not result.OK then
171+
failwithf "NUnit test failed: %A" result.Errors)
188172

189-
Target.create "MsTest" (fun _ ->
190-
DotNet.test id "tests/FsUnit.MsTest.Test/"
191-
)
173+
Target.create "xUnit" (fun _ ->
174+
let result = DotNet.exec id "test" "tests/FsUnit.Xunit.Test/"
175+
176+
if not result.OK then
177+
failwithf "xUnit test failed: %A" result.Errors)
178+
179+
Target.create "MsTest" (fun _ ->
180+
let result = DotNet.exec id "test" "tests/FsUnit.MsTest.Test/"
181+
182+
if not result.OK then
183+
failwithf "MsTest test failed: %A" result.Errors)
192184

193185
Target.create "RunTests" ignore
194186

195187
// --------------------------------------------------------------------------------------
196188
// Build a NuGet package
197189

198190
Target.create "NuGet" (fun _ ->
199-
Paket.pack(fun p ->
191+
Paket.pack (fun p ->
200192
{ p with
201193
ToolType = ToolType.CreateLocalTool()
202194
OutputPath = "bin"
203-
Version = release.NugetVersion
204-
ReleaseNotes = String.toLines release.Notes})
205-
)
195+
Version = release.AssemblyVersion
196+
ReleaseNotes = String.toLines release.Notes }))
206197

207198
Target.create "PublishNuget" (fun _ ->
208-
Paket.push(fun p ->
199+
Paket.push (fun p ->
209200
{ p with
210201
ToolType = ToolType.CreateLocalTool()
211-
WorkingDir = "bin" })
212-
)
202+
WorkingDir = "bin" }))
213203

214204

215205
// --------------------------------------------------------------------------------------
216206
// Generate the documentation
217207

218208
Target.create "GenerateDocs" (fun _ ->
219-
Shell.cleanDir ".fsdocs"
220-
DotNet.exec id "fsdocs" "build --clean --parameters root https://fsprojects.github.io/FsUnit" |> ignore
221-
)
209+
Shell.cleanDir ".fsdocs"
210+
211+
DotNet.exec id "fsdocs" "build --clean --parameters root https://fsprojects.github.io/FsUnit"
212+
|> ignore)
222213
// --------------------------------------------------------------------------------------
223214
// Release Scripts
224215

@@ -231,8 +222,7 @@ Target.create "ReleaseDocs" (fun _ ->
231222
Shell.copyRecursive "output" tempDocsDir true |> Trace.tracefn "%A"
232223
Staging.stageAll tempDocsDir
233224
Commit.exec tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion)
234-
Branches.push tempDocsDir
235-
)
225+
Branches.push tempDocsDir)
236226

237227
// --------------------------------------------------------------------------------------
238228
// Run all targets by default. Invoke 'build <Target>' to override

0 commit comments

Comments
 (0)