Skip to content

Commit

Permalink
Cleanup build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptnCodr committed Dec 19, 2023
1 parent 8acd348 commit 932456c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ let cloneUrl = "[email protected]:fsprojects/FsUnit.git"

// Read additional information from the release notes document
let release = ReleaseNotes.load "RELEASE_NOTES.md"
let version = $"{release.AssemblyVersion}-alpha2"
let version = release.AssemblyVersion

// Helper active pattern for project types
let (|Fsproj|Csproj|Vbproj|) (projFileName: string) =
match projFileName with
| f when f.EndsWith("fsproj") -> Fsproj
| f when f.EndsWith("csproj") -> Csproj
| f when f.EndsWith("vbproj") -> Vbproj
| _ -> failwith (sprintf "Project file %s not supported. Unknown project type." projFileName)
| _ -> failwith $"Project file %s{projFileName} not supported. Unknown project type."

// Generate assembly info files with the right version & up-to-date information
Target.create "AssemblyInfo" (fun _ ->
Expand Down Expand Up @@ -141,7 +141,7 @@ Target.create "CheckFormat" (fun _ ->
elif result.ExitCode = 99 then
failwith "Some files need formatting, check output for more info"
else
Trace.logf "Errors while formatting: %A" result.Errors)
Trace.logf $"Errors while formatting: %A{result.Errors}")

Target.create "Format" (fun _ ->
let result =
Expand All @@ -151,7 +151,7 @@ Target.create "Format" (fun _ ->
|> DotNet.exec id "fantomas"

if not result.OK then
printfn "Errors while formatting all files: %A" result.Messages)
printfn $"Errors while formatting all files: %A{result.Messages}")

// --------------------------------------------------------------------------------------
// Build library & test project
Expand All @@ -169,19 +169,19 @@ Target.create "NUnit" (fun _ ->
let result = DotNet.exec id "test" "tests/FsUnit.NUnit.Test/"

if not result.OK then
failwithf "NUnit test failed: %A" result.Errors)
failwithf $"NUnit test failed: %A{result.Errors}")

Target.create "xUnit" (fun _ ->
let result = DotNet.exec id "test" "tests/FsUnit.Xunit.Test/"

if not result.OK then
failwithf "xUnit test failed: %A" result.Errors)
failwithf $"xUnit test failed: %A{result.Errors}")

Target.create "MsTest" (fun _ ->
let result = DotNet.exec id "test" "tests/FsUnit.MsTest.Test/"

if not result.OK then
failwithf "MsTest test failed: %A" result.Errors)
failwithf $"MsTest test failed: %A{result.Errors}")

Target.create "RunTests" ignore

Expand Down

0 comments on commit 932456c

Please sign in to comment.