diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index ea69320c..2dceca2c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -8,12 +8,6 @@ "paket" ] }, - "fake-cli": { - "version": "6.1.3", - "commands": [ - "fake" - ] - }, "fsdocs-tool": { "version": "19.1.1", "commands": [ @@ -27,4 +21,4 @@ ] } } -} \ No newline at end of file +} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 80b14a26..0ee83e07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,14 +24,11 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3 with: - # FAKE 6 needs the .NET 6 SDK alongside the .NET 8 project SDK. - dotnet-version: | - 6.0.428 - ${{ matrix.dotnet }} + dotnet-version: ${{ matrix.dotnet }} - name: Install local tools run: dotnet tool restore - name: Paket Restore run: dotnet paket restore - name: Build and Test - run: dotnet fake run build.fsx \ No newline at end of file + run: dotnet run --project build/build.fsproj diff --git a/.gitignore b/.gitignore index f77b8cce..2a6a6868 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,7 @@ _ReSharper*/ # Build Output pkg [Bb]uild +!/build/ # =================================================== @@ -114,4 +115,4 @@ FsUnit.Xunit.Test.dll.xunit.html NUnit.xml xunit.html -release.sh \ No newline at end of file +release.sh diff --git a/FsUnit.sln b/FsUnit.sln index a1dfc6fd..89c29035 100644 --- a/FsUnit.sln +++ b/FsUnit.sln @@ -10,7 +10,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{35F65EEF-9059-4829-93EE-C8F7810B3997}" ProjectSection(SolutionItems) = preProject build.cmd = build.cmd - build.fsx = build.fsx build.sh = build.sh paket.dependencies = paket.dependencies paket.lock = paket.lock diff --git a/build.cmd b/build.cmd index 903ad7b3..07af35cd 100644 --- a/build.cmd +++ b/build.cmd @@ -3,4 +3,4 @@ cls dotnet tool restore dotnet paket restore -dotnet fake run build.fsx %* +dotnet run --project build/build.fsproj -- %* diff --git a/build.fsx.lock b/build.fsx.lock deleted file mode 100644 index 551b561d..00000000 --- a/build.fsx.lock +++ /dev/null @@ -1,263 +0,0 @@ -STORAGE: NONE -RESTRICTION: == net6.0 -NUGET - remote: https://api.nuget.org/v3/index.json - BlackFox.VsWhere (1.1) - FSharp.Core (>= 4.2.3) - Microsoft.Win32.Registry (>= 4.7) - Fake.Api.GitHub (5.23.1) - FSharp.Core (>= 6.0) - Octokit (>= 0.50) - Fake.Core.CommandLineParsing (5.23.1) - FParsec (>= 1.1.1) - FSharp.Core (>= 6.0) - Fake.Core.Context (5.23.1) - FSharp.Core (>= 6.0) - Fake.Core.Environment (5.23.1) - FSharp.Core (>= 6.0) - Fake.Core.FakeVar (5.23.1) - Fake.Core.Context (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.Core.Process (5.23.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.FakeVar (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - Fake.IO.FileSystem (>= 5.23.1) - FSharp.Core (>= 6.0) - System.Collections.Immutable (>= 5.0) - Fake.Core.ReleaseNotes (5.23.1) - Fake.Core.SemVer (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.Core.SemVer (5.23.1) - FSharp.Core (>= 6.0) - Fake.Core.String (5.23.1) - FSharp.Core (>= 6.0) - Fake.Core.Target (5.23.1) - Fake.Core.CommandLineParsing (>= 5.23.1) - Fake.Core.Context (>= 5.23.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.FakeVar (>= 5.23.1) - Fake.Core.Process (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - FSharp.Control.Reactive (>= 5.0.2) - FSharp.Core (>= 6.0) - Fake.Core.Tasks (5.23.1) - Fake.Core.Trace (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.Core.Trace (5.23.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.FakeVar (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.Core.Xml (5.23.1) - Fake.Core.String (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.DotNet.AssemblyInfoFile (5.23.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - Fake.IO.FileSystem (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.DotNet.Cli (5.23.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.Process (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - Fake.DotNet.MSBuild (>= 5.23.1) - Fake.DotNet.NuGet (>= 5.23.1) - Fake.IO.FileSystem (>= 5.23.1) - FSharp.Core (>= 6.0) - Mono.Posix.NETStandard (>= 1.0) - Newtonsoft.Json (>= 13.0.1) - Fake.DotNet.Fsi (5.23.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.Process (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - Fake.DotNet.MSBuild (>= 5.23.1) - Fake.IO.FileSystem (>= 5.23.1) - Fake.Tools.Git (>= 5.23.1) - FSharp.Compiler.Service (>= 37.0) - FSharp.Core (>= 6.0) - Fake.DotNet.MSBuild (5.23.1) - BlackFox.VsWhere (>= 1.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.Process (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - Fake.IO.FileSystem (>= 5.23.1) - FSharp.Core (>= 6.0) - MSBuild.StructuredLogger (>= 2.1.545) - Fake.DotNet.NuGet (5.23.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.Process (>= 5.23.1) - Fake.Core.SemVer (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Tasks (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - Fake.Core.Xml (>= 5.23.1) - Fake.IO.FileSystem (>= 5.23.1) - Fake.Net.Http (>= 5.23.1) - FSharp.Core (>= 6.0) - Newtonsoft.Json (>= 13.0.1) - NuGet.Protocol (>= 5.11) - Fake.DotNet.Paket (5.23.1) - Fake.Core.Process (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - Fake.DotNet.Cli (>= 5.23.1) - Fake.IO.FileSystem (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.IO.FileSystem (5.23.1) - Fake.Core.String (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.Net.Http (5.23.1) - Fake.Core.Trace (>= 5.23.1) - FSharp.Core (>= 6.0) - Fake.Tools.Git (5.23.1) - Fake.Core.Environment (>= 5.23.1) - Fake.Core.Process (>= 5.23.1) - Fake.Core.SemVer (>= 5.23.1) - Fake.Core.String (>= 5.23.1) - Fake.Core.Trace (>= 5.23.1) - Fake.IO.FileSystem (>= 5.23.1) - FSharp.Core (>= 6.0) - FParsec (1.1.1) - FSharp.Core (>= 4.3.4) - FSharp.Compiler.Service (37.0) - FSharp.Core (>= 4.6.2) - Microsoft.Build.Framework (>= 16.6) - Microsoft.Build.Tasks.Core (>= 16.6) - Microsoft.Build.Utilities.Core (>= 16.6) - System.Buffers (>= 4.5) - System.Collections.Immutable (>= 1.5) - System.Memory (>= 4.5.3) - System.Reflection.Emit (>= 4.3) - System.Reflection.Metadata (>= 1.6) - System.Reflection.TypeExtensions (>= 4.3) - System.Runtime.Loader (>= 4.0) - FSharp.Control.Reactive (5.0.5) - FSharp.Core (>= 4.7.2) - System.Reactive (>= 5.0 < 6.0) - FSharp.Core (6.0) - Microsoft.Build.Framework (17.5) - Microsoft.Win32.Registry (>= 5.0) - System.Security.Permissions (>= 6.0) - Microsoft.Build.Tasks.Core (17.5) - Microsoft.Build.Framework (>= 17.5) - Microsoft.Build.Utilities.Core (>= 17.5) - Microsoft.NET.StringTools (>= 17.5) - Microsoft.Win32.Registry (>= 5.0) - System.CodeDom (>= 6.0) - System.Collections.Immutable (>= 6.0) - System.Reflection.Metadata (>= 6.0) - System.Resources.Extensions (>= 6.0) - System.Security.Cryptography.Pkcs (>= 6.0.1) - System.Security.Cryptography.Xml (>= 6.0.1) - System.Security.Permissions (>= 6.0) - System.Threading.Tasks.Dataflow (>= 6.0) - Microsoft.Build.Utilities.Core (17.5) - Microsoft.Build.Framework (>= 17.5) - Microsoft.NET.StringTools (>= 17.5) - Microsoft.Win32.Registry (>= 5.0) - System.Collections.Immutable (>= 6.0) - System.Configuration.ConfigurationManager (>= 6.0) - System.Security.Permissions (>= 6.0) - System.Text.Encoding.CodePages (>= 6.0) - Microsoft.NET.StringTools (17.5) - System.Memory (>= 4.5.5) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - Microsoft.NETCore.Platforms (7.0.2) - Microsoft.NETCore.Targets (5.0) - Microsoft.Win32.Registry (5.0) - System.Security.AccessControl (>= 5.0) - System.Security.Principal.Windows (>= 5.0) - Microsoft.Win32.SystemEvents (7.0) - Mono.Posix.NETStandard (1.0) - MSBuild.StructuredLogger (2.1.815) - Microsoft.Build.Framework (>= 16.10) - Microsoft.Build.Utilities.Core (>= 16.10) - Newtonsoft.Json (13.0.3) - NuGet.Common (6.5) - NuGet.Frameworks (>= 6.5) - NuGet.Configuration (6.5) - NuGet.Common (>= 6.5) - System.Security.Cryptography.ProtectedData (>= 4.4) - NuGet.Frameworks (6.5) - NuGet.Packaging (6.5) - Newtonsoft.Json (>= 13.0.1) - NuGet.Configuration (>= 6.5) - NuGet.Versioning (>= 6.5) - System.Security.Cryptography.Cng (>= 5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - NuGet.Protocol (6.5) - NuGet.Packaging (>= 6.5) - NuGet.Versioning (6.5) - Octokit (5.1) - System.Buffers (4.5.1) - System.CodeDom (7.0) - System.Collections.Immutable (7.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - System.Configuration.ConfigurationManager (7.0) - System.Security.Cryptography.ProtectedData (>= 7.0) - System.Security.Permissions (>= 7.0) - System.Drawing.Common (7.0) - Microsoft.Win32.SystemEvents (>= 7.0) - System.Formats.Asn1 (7.0) - System.IO (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Memory (4.5.5) - System.Reactive (5.0) - System.Reflection (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.IO (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Reflection.Emit (4.7) - System.Reflection.Metadata (7.0.1) - System.Collections.Immutable (>= 7.0) - System.Reflection.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Reflection.TypeExtensions (4.7) - System.Resources.Extensions (7.0) - System.Runtime (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime.CompilerServices.Unsafe (6.0) - System.Runtime.Loader (4.3) - System.IO (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Security.AccessControl (6.0) - System.Security.Cryptography.Cng (5.0) - System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Pkcs (7.0.1) - System.Formats.Asn1 (>= 7.0) - System.Security.Cryptography.ProtectedData (7.0.1) - System.Security.Cryptography.Xml (7.0.1) - System.Security.Cryptography.Pkcs (>= 7.0) - System.Security.Permissions (7.0) - System.Windows.Extensions (>= 7.0) - System.Security.Principal.Windows (5.0) - System.Text.Encoding (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding.CodePages (7.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - System.Threading.Tasks (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Threading.Tasks.Dataflow (7.0) - System.Windows.Extensions (7.0) - System.Drawing.Common (>= 7.0) diff --git a/build.sh b/build.sh index 76d38134..15694036 100755 --- a/build.sh +++ b/build.sh @@ -2,4 +2,4 @@ dotnet tool restore dotnet paket restore -dotnet fake run build.fsx $@ \ No newline at end of file +dotnet run --project build/build.fsproj -- "$@" diff --git a/build.fsx b/build/build.fs similarity index 94% rename from build.fsx rename to build/build.fs index 966e56b9..0554856d 100644 --- a/build.fsx +++ b/build/build.fs @@ -1,20 +1,4 @@ -#r @"paket: -source https://api.nuget.org/v3/index.json -framework: net6.0 -nuget FSharp.Core 6.0.0.0 -nuget Fake.Core.Target -nuget Fake.Core.Trace -nuget Fake.Core.ReleaseNotes -nuget Fake.IO.FileSystem -nuget Fake.DotNet.Cli -nuget Fake.DotNet.MSBuild -nuget Fake.DotNet.AssemblyInfoFile -nuget Fake.DotNet.Paket -nuget Fake.DotNet.Fsi -nuget Fake.Tools.Git -nuget Fake.Api.GitHub //" - -#load "./.fake/build.fsx/intellisense.fsx" +module Build open Fake.Core open Fake.Core.TargetOperators @@ -25,7 +9,8 @@ open Fake.DotNet open Fake.Tools.Git open System.IO -Target.initEnvironment() +let execContext = Context.FakeExecutionContext.Create false "build.fs" [] +Context.setExecutionContext (Context.RuntimeContext.Fake execContext) // -------------------------------------------------------------------------------------- // Project-specific details below @@ -252,4 +237,9 @@ Target.create "Release" ignore ==> "ReleaseDocs" ==> "Release" -Target.runOrDefault "All" +[] +let main args = + match args with + | [| target |] -> Target.runOrDefault target + | _ -> Target.runOrDefault "All" + 0 diff --git a/build/build.fsproj b/build/build.fsproj new file mode 100644 index 00000000..a16b7974 --- /dev/null +++ b/build/build.fsproj @@ -0,0 +1,22 @@ + + + Exe + net8.0 + + + + + + + + + + + + + + + + + +