From 55d0ff0d9d1b683eaa4ddf07defffe766668639e Mon Sep 17 00:00:00 2001 From: 1eyewonder Date: Tue, 28 Jan 2025 11:00:12 -0600 Subject: [PATCH 1/8] Updated paket tool version --- .config/dotnet-tools.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 9646a0fd20..3d9abb1e4c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,11 +3,11 @@ "isRoot": true, "tools": { "paket": { - "version": "9.0.0", + "version": "9.0.2", "commands": [ "paket" ], "rollForward": false } } -} +} \ No newline at end of file From 3d3ad4dea16ee92fbb37a13ecef9bb32ac7361fc Mon Sep 17 00:00:00 2001 From: 1eyewonder Date: Tue, 28 Jan 2025 11:06:48 -0600 Subject: [PATCH 2/8] Updated project framework versions to net8 --- src/FSharp.DependencyManager.Paket/paket.references | 3 --- src/LockFileComparer/LockFileComparer.fsproj | 2 +- src/Paket.Bootstrapper/Paket.Bootstrapper.csproj | 2 +- src/Paket/Paket.fsproj | 4 ++-- .../Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj | 1 - tests/Paket.Tests/Paket.Tests.fsproj | 2 +- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/FSharp.DependencyManager.Paket/paket.references b/src/FSharp.DependencyManager.Paket/paket.references index 9db95a5aa3..9eca1f4f2b 100644 --- a/src/FSharp.DependencyManager.Paket/paket.references +++ b/src/FSharp.DependencyManager.Paket/paket.references @@ -1,5 +1,2 @@ DotNet.ReproducibleBuilds - -group FSharpDepManagerExtension - FSharp.Core \ No newline at end of file diff --git a/src/LockFileComparer/LockFileComparer.fsproj b/src/LockFileComparer/LockFileComparer.fsproj index 38994794ef..2b1238a041 100644 --- a/src/LockFileComparer/LockFileComparer.fsproj +++ b/src/LockFileComparer/LockFileComparer.fsproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1 + net8 false diff --git a/src/Paket.Bootstrapper/Paket.Bootstrapper.csproj b/src/Paket.Bootstrapper/Paket.Bootstrapper.csproj index 0aa96923ca..0173747abf 100644 --- a/src/Paket.Bootstrapper/Paket.Bootstrapper.csproj +++ b/src/Paket.Bootstrapper/Paket.Bootstrapper.csproj @@ -2,7 +2,7 @@ Exe - net461;netcoreapp2.1 + net461;net8 Paket.Bootstrapper.Program paket.bootstrapper paketbootstrapper diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index ff4bd43ce0..d6fba3e3db 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -2,7 +2,7 @@ Exe - net461;netcoreapp3.1 + net461;net8 Paket paket true @@ -12,7 +12,7 @@ - netcoreapp3.1 + net8 diff --git a/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj b/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj index 9376c7bec8..904e1e9c4c 100644 --- a/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj +++ b/tests/Paket.Bootstrapper.Tests/Paket.Bootstrapper.Tests.csproj @@ -2,7 +2,6 @@ Library - net8 net461;net8 true diff --git a/tests/Paket.Tests/Paket.Tests.fsproj b/tests/Paket.Tests/Paket.Tests.fsproj index 412b599201..79e7d75c29 100644 --- a/tests/Paket.Tests/Paket.Tests.fsproj +++ b/tests/Paket.Tests/Paket.Tests.fsproj @@ -2,7 +2,7 @@ Library - net461;net6 + net461;net8 true From 06012bb3a4d1c0d2c486d535ce51b97a6f9d7403 Mon Sep 17 00:00:00 2001 From: 1eyewonder Date: Tue, 28 Jan 2025 11:08:03 -0600 Subject: [PATCH 3/8] Ran `dotnet paket install` after removing FSharpDepManagerExtension paket group --- paket.dependencies | 8 ++------ paket.lock | 6 +----- tests/Paket.Tests/App.config | 5 ----- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index 7750836032..dfdcbd4c83 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -5,7 +5,7 @@ content: none nuget Newtonsoft.Json >= 10.0.3 redirects: force nuget Argu >= 5.1.0 -nuget FSharp.Core >= 6.0.3 redirects: force +nuget FSharp.Core >= 6.0.3 nuget Chessie >= 0.6 nuget Mono.Cecil ~> 0.11.1 @@ -56,8 +56,4 @@ group Build nuget 0x53A.ReferenceAssemblies.Paket 0.2.0 # add icon to exe - github enricosada/add_icon_to_exe:e11eda501acea369ac2950beb34b8888495bf21f rh/ResourceHacker.exe - -group FSharpDepManagerExtension - source https://api.nuget.org/v3/index.json - nuget FSharp.Core = 5.0.0 redirects: force \ No newline at end of file + github enricosada/add_icon_to_exe:e11eda501acea369ac2950beb34b8888495bf21f rh/ResourceHacker.exe \ No newline at end of file diff --git a/paket.lock b/paket.lock index 939f9b9fa3..0ab9f67456 100644 --- a/paket.lock +++ b/paket.lock @@ -854,8 +854,4 @@ GITHUB modules/Octokit/Octokit.fsx (13eee5a7b990fa310813f9760094aa3cfebeb33f) Octokit (>= 0.20) remote: enricosada/add_icon_to_exe - rh/ResourceHacker.exe (e11eda501acea369ac2950beb34b8888495bf21f) -GROUP FSharpDepManagerExtension -NUGET - remote: https://api.nuget.org/v3/index.json - FSharp.Core (5.0) - redirects: force + rh/ResourceHacker.exe (e11eda501acea369ac2950beb34b8888495bf21f) \ No newline at end of file diff --git a/tests/Paket.Tests/App.config b/tests/Paket.Tests/App.config index 4bc5ff7907..d4bb870023 100644 --- a/tests/Paket.Tests/App.config +++ b/tests/Paket.Tests/App.config @@ -4,11 +4,6 @@ - - True - - - True From 747fd6c90953a43926fd59cf9e04bcef48e1d2cd Mon Sep 17 00:00:00 2001 From: 1eyewonder Date: Tue, 28 Jan 2025 11:09:59 -0600 Subject: [PATCH 4/8] Ran `dotnet paket update FSharp.Core` --- paket.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/paket.lock b/paket.lock index 0ab9f67456..94e07d9469 100644 --- a/paket.lock +++ b/paket.lock @@ -36,8 +36,8 @@ NUGET FsCheck (2.15.3) FSharp.Core (>= 4.0.0.1) - restriction: && (< net452) (>= netstandard1.0) (< netstandard1.6) FSharp.Core (>= 4.2.3) - restriction: || (>= net452) (>= netstandard1.6) - FSharp.Compiler.Service (43.8.400) - FSharp.Core (8.0.400) - restriction: >= netstandard2.0 + FSharp.Compiler.Service (43.9.101) + FSharp.Core (9.0.101) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 System.Diagnostics.DiagnosticSource (>= 8.0) - restriction: >= netstandard2.0 @@ -45,7 +45,7 @@ NUGET System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 System.Reflection.Metadata (>= 8.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (8.0.400) + FSharp.Core (9.0.101) Microsoft.Build.Tasks.Git (1.0) - copy_local: true Microsoft.CodeCoverage (16.7.1) - restriction: || (>= net45) (>= netcoreapp1.0) Microsoft.CSharp (4.7) - redirects: force, restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) @@ -78,8 +78,8 @@ NUGET Microsoft.NETCore.DotNetHostResolver (>= 3.1.8) Microsoft.NETCore.DotNetHostResolver (3.1.8) - restriction: >= netcoreapp2.2 Microsoft.NETCore.DotNetAppHost (>= 3.1.8) - Microsoft.NETCore.Platforms (5.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.2) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.5) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (>= netcoreapp2.0) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (>= netstandard1.1) (< portable-net45+win8+wpa81)) (&& (< netstandard1.1) (>= uap10.0) (< win8)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (>= netstandard1.3) (< portable-net45+win8+wpa81)) (&& (< netstandard1.3) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (>= netstandard1.5) (< portable-net45+win8+wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) - Microsoft.NETCore.Targets (3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.2) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.5) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp2.2) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (>= netstandard1.1) (< portable-net45+win8+wpa81)) (&& (< netstandard1.1) (>= uap10.0) (< win8)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (>= netstandard1.3) (< portable-net45+win8+wpa81)) (&& (< netstandard1.3) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< portable-net45+win8+wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< win81) (< wpa81)) + Microsoft.NETCore.Platforms (5.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.2) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.5) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (&& (>= netcoreapp1.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp2.0) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (>= netstandard1.1) (< portable-net45+win8+wpa81)) (&& (< netstandard1.1) (>= uap10.0) (< win8)) (&& (>= netstandard1.2) (< portable-net45+win8+wpa81)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (>= netstandard1.3) (< portable-net45+win8+wpa81)) (&& (< netstandard1.3) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (>= netstandard1.5) (< portable-net45+win8+wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) + Microsoft.NETCore.Targets (3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.2) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.5) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (>= netcoreapp2.2) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (>= netstandard1.1) (< portable-net45+win8+wpa81)) (&& (< netstandard1.1) (>= uap10.0) (< win8)) (&& (>= netstandard1.2) (< portable-net45+win8+wpa81)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (>= netstandard1.3) (< portable-net45+win8+wpa81)) (&& (< netstandard1.3) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< portable-net45+win8+wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< win81) (< wpa81)) Microsoft.NETFramework.ReferenceAssemblies.net461 (1.0.3) - copy_local: true Microsoft.SourceLink.AzureRepos.Git (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) From 9759675dbf988a4025af1fba9e38a1878098cf2a Mon Sep 17 00:00:00 2001 From: 1eyewonder Date: Tue, 28 Jan 2025 11:13:05 -0600 Subject: [PATCH 5/8] Updated build script to use net8 args --- build.fsx | 588 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 309 insertions(+), 279 deletions(-) diff --git a/build.fsx b/build.fsx index 8f3019e425..0121b9e103 100644 --- a/build.fsx +++ b/build.fsx @@ -27,11 +27,13 @@ let project = "Paket" // Short summary of the project // (used as description in AssemblyInfo and as a short summary for NuGet package) -let summary = "A dependency manager for .NET with support for NuGet packages and git repositories." +let summary = + "A dependency manager for .NET with support for NuGet packages and git repositories." // Longer description of the project // (used as a description for NuGet package; line breaks are automatically cleaned up) -let description = "A dependency manager for .NET with support for NuGet packages and git repositories." +let description = + "A dependency manager for .NET with support for NuGet packages and git repositories." // List of author names (for NuGet package) let authors = [ "Paket team" ] @@ -44,7 +46,9 @@ let solutionFile = "Paket.sln" // Pattern specifying assemblies to be tested using NUnit let testAssemblies = "tests/**/bin/Release/net461/*Tests*.dll" -let integrationTestAssemblies = "integrationtests/Paket.IntegrationTests/bin/Release/net461/*Tests*.dll" + +let integrationTestAssemblies = + "integrationtests/Paket.IntegrationTests/bin/Release/net461/*Tests*.dll" // Git configuration (used for publishing documentation in gh-pages branch) // The profile where the project is posted @@ -67,10 +71,10 @@ let mutable dotnetExePath = "dotnet" let buildDir = "bin" let buildDirNet461 = buildDir @@ "net461" -let buildDirNetCore = buildDir @@ "netcoreapp3.1" +let buildDirNetCore = buildDir @@ "net8" let buildDirBootstrapper = "bin_bootstrapper" let buildDirBootstrapperNet461 = buildDirBootstrapper @@ "net461" -let buildDirBootstrapperNetCore = buildDirBootstrapper @@ "netcoreapp2.1" +let buildDirBootstrapperNetCore = buildDirBootstrapper @@ "net8" let tempDir = "temp" let buildMergedDir = buildDir @@ "merged" let paketFile = buildMergedDir @@ "paket.exe" @@ -80,9 +84,7 @@ Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ System.Net.ServicePointManager.SecurityProtocol <- unbox 192 ||| unbox 768 ||| unbox 3072 ||| unbox 48 // Read additional information from the release notes document -let releaseNotesData = - File.ReadAllLines "RELEASE_NOTES.md" - |> parseAllReleaseNotes +let releaseNotesData = File.ReadAllLines "RELEASE_NOTES.md" |> parseAllReleaseNotes let release = List.head releaseNotesData @@ -94,19 +96,22 @@ let stable = let runDotnet workingDir args = let result = - ExecProcess (fun info -> - info.FileName <- dotnetExePath - info.WorkingDirectory <- workingDir - info.Arguments <- args) TimeSpan.MaxValue + ExecProcess + (fun info -> + info.FileName <- dotnetExePath + info.WorkingDirectory <- workingDir + info.Arguments <- args) + TimeSpan.MaxValue + if result <> 0 then failwithf "dotnet %s failed" args -let testSuiteFilterFlakyTests = getEnvironmentVarAsBoolOrDefault "PAKET_TESTSUITE_FLAKYTESTS" false +let testSuiteFilterFlakyTests = + getEnvironmentVarAsBoolOrDefault "PAKET_TESTSUITE_FLAKYTESTS" false Target "InstallDotNetCore" (fun _ -> dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion - Environment.SetEnvironmentVariable("DOTNET_EXE_PATH", dotnetExePath) -) + Environment.SetEnvironmentVariable("DOTNET_EXE_PATH", dotnetExePath)) // -------------------------------------------------------------------------------------- // Clean build results @@ -123,13 +128,9 @@ Target "Clean" (fun _ -> ++ tempDir |> CleanDirs - !! "**/obj/**/*.nuspec" - |> DeleteFiles -) + !! "**/obj/**/*.nuspec" |> DeleteFiles) -Target "CleanDocs" (fun _ -> - CleanDirs ["docs/output"] -) +Target "CleanDocs" (fun _ -> CleanDirs [ "docs/output" ]) // -------------------------------------------------------------------------------------- // Build library & test project @@ -137,14 +138,11 @@ Target "CleanDocs" (fun _ -> let releaseNotesProp releaseNotesLines = let xn name = XName.Get(name) let text = releaseNotesLines |> String.concat Environment.NewLine + let doc = XDocument( [ XComment("This document was automatically generated.") :> obj - XElement(xn "Project", - XElement(xn "PropertyGroup", - XElement(xn "PackageReleaseNotes", text) - ) - ) :> obj ] + XElement(xn "Project", XElement(xn "PropertyGroup", XElement(xn "PackageReleaseNotes", text))) :> obj ] ) let path = Path.GetTempFileName() @@ -153,76 +151,61 @@ let releaseNotesProp releaseNotesLines = let releaseNotesPath = releaseNotesProp release.Notes -let packageProps = [ - sprintf "/p:Version=%s" release.NugetVersion - sprintf "/p:PackageReleaseNotesFile=\"%s\"" releaseNotesPath -] +let packageProps = + [ sprintf "/p:Version=%s" release.NugetVersion + sprintf "/p:PackageReleaseNotesFile=\"%s\"" releaseNotesPath ] Target "Build" (fun _ -> - DotNetCli.Build (fun c -> + DotNetCli.Build(fun c -> { c with Project = solutionFile ToolPath = dotnetExePath - AdditionalArgs = packageProps - }) -) + AdditionalArgs = packageProps })) Target "Restore" (fun _ -> - DotNetCli.RunCommand (fun c -> - { c with - ToolPath = dotnetExePath - }) "tool restore" + DotNetCli.RunCommand (fun c -> { c with ToolPath = dotnetExePath }) "tool restore" - DotNetCli.Restore (fun c -> + DotNetCli.Restore(fun c -> { c with Project = "Paket.sln" - ToolPath = dotnetExePath - }) -) + ToolPath = dotnetExePath })) Target "Publish" (fun _ -> - let publishArgs = - [ - "--no-build" - ] // since no build, we have to ensure that the build sets assemblyinfo correctly, especially because the publish output of this step - // is used in the ILRepack of the .net executable + let publishArgs = [ "--no-build" ] // since no build, we have to ensure that the build sets assemblyinfo correctly, especially because the publish output of this step + // is used in the ILRepack of the .net executable - DotNetCli.Publish (fun c -> + DotNetCli.Publish(fun c -> { c with Project = "src/Paket" Framework = "net461" - Output = FullName (currentDirectory buildDirNet461) + Output = FullName(currentDirectory buildDirNet461) ToolPath = dotnetExePath - AdditionalArgs = publishArgs - }) + AdditionalArgs = publishArgs }) - DotNetCli.Publish (fun c -> + DotNetCli.Publish(fun c -> { c with Project = "src/Paket" - Framework = "netcoreapp3.1" - Output = FullName (currentDirectory buildDirNetCore) + Framework = "net8" + Output = FullName(currentDirectory buildDirNetCore) ToolPath = dotnetExePath - AdditionalArgs = publishArgs - }) + AdditionalArgs = publishArgs }) - DotNetCli.Publish (fun c -> + DotNetCli.Publish(fun c -> { c with Project = "src/Paket.Bootstrapper" Framework = "net461" - Output = FullName (currentDirectory buildDirBootstrapperNet461) + Output = FullName(currentDirectory buildDirBootstrapperNet461) ToolPath = dotnetExePath - AdditionalArgs = publishArgs - }) + AdditionalArgs = publishArgs }) - DotNetCli.Publish (fun c -> + DotNetCli.Publish(fun c -> { c with Project = "src/Paket.Bootstrapper" - Framework = "netcoreapp2.1" - Output = FullName (currentDirectory buildDirBootstrapperNetCore) + Framework = "net8" + Output = FullName(currentDirectory buildDirBootstrapperNetCore) ToolPath = dotnetExePath - AdditionalArgs = publishArgs - }) -) + AdditionalArgs = publishArgs })) + "Clean" ==> "Build" ?=> "Publish" // -------------------------------------------------------------------------------------- @@ -231,50 +214,55 @@ Target "Publish" (fun _ -> Target "RunTests" (fun _ -> let runTest fw proj tfm = - CreateDir (sprintf "tests_result/%s/%s" fw proj) + CreateDir(sprintf "tests_result/%s/%s" fw proj) - let logFilePath = (sprintf "tests_result/%s/%s/TestResult.trx" fw proj) |> Path.GetFullPath + let logFilePath = + (sprintf "tests_result/%s/%s/TestResult.trx" fw proj) |> Path.GetFullPath - DotNetCli.Test (fun c -> + DotNetCli.Test(fun c -> { c with Project = "tests/Paket.Tests/Paket.Tests.fsproj" Framework = tfm AdditionalArgs = - [ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky") - sprintf "--logger:trx;LogFileName=%s" logFilePath - "--no-build" - "-v"; "n"] - ToolPath = dotnetExePath - }) + [ "--filter" + (if testSuiteFilterFlakyTests then + "TestCategory=Flaky" + else + "TestCategory!=Flaky") + sprintf "--logger:trx;LogFileName=%s" logFilePath + "--no-build" + "-v" + "n" ] + ToolPath = dotnetExePath }) runTest "net" "Paket.Tests" "net461" - runTest "netcore" "Paket.Tests" "netcoreapp3.0" + runTest "netcore" "Paket.Tests" "net8" runTest "net" "Paket.Bootstrapper.Tests" "net461" - runTest "netcore" "Paket.Bootstrapper.Tests" "netcoreapp3.0" -) + runTest "netcore" "Paket.Bootstrapper.Tests" "net8") Target "QuickTest" (fun _ -> - DotNetCli.Test (fun c -> + DotNetCli.Test(fun c -> { c with Project = "tests/Paket.Tests/Paket.Tests.fsproj" AdditionalArgs = - [ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky") ] - ToolPath = dotnetExePath - }) -) + [ "--filter" + (if testSuiteFilterFlakyTests then + "TestCategory=Flaky" + else + "TestCategory!=Flaky") ] + ToolPath = dotnetExePath })) + "Clean" ==> "QuickTest" Target "QuickIntegrationTests" (fun _ -> - DotNetCli.Test (fun c -> + DotNetCli.Test(fun c -> { c with Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj" - AdditionalArgs = - [ "--filter"; "TestCategory=scriptgen" ] + AdditionalArgs = [ "--filter"; "TestCategory=scriptgen" ] TimeOut = TimeSpan.FromMinutes 40. - ToolPath = dotnetExePath - }) -) + ToolPath = dotnetExePath })) + "Clean" ==> "Publish" ==> "QuickIntegrationTests" @@ -290,40 +278,54 @@ Target "MergePaketTool" (fun _ -> let primaryExe = inBuildDirNet461 "paket.exe" let mergeLibs = - [ - "Argu.dll" - "Chessie.dll" - "Fake.Core.ReleaseNotes.dll" - "FSharp.Core.dll" - "Mono.Cecil.dll" - "Newtonsoft.Json.dll" - "NuGet.Common.dll" - "NuGet.Configuration.dll" - "NuGet.Frameworks.dll" - "NuGet.Packaging.dll" - "NuGet.Versioning.dll" - "Paket.Core.dll" - "System.Buffers.dll" - "System.Configuration.ConfigurationManager.dll" - "System.Memory.dll" - "System.Net.Http.WinHttpHandler.dll" - "System.Numerics.Vectors.dll" - "System.Runtime.CompilerServices.Unsafe.dll" - "System.Security.Cryptography.Cng.dll" - "System.Security.Cryptography.Pkcs.dll" - "System.Threading.Tasks.Extensions.dll" - ] + [ "Argu.dll" + "Chessie.dll" + "Fake.Core.ReleaseNotes.dll" + "FSharp.Core.dll" + "Mono.Cecil.dll" + "Newtonsoft.Json.dll" + "NuGet.Common.dll" + "NuGet.Configuration.dll" + "NuGet.Frameworks.dll" + "NuGet.Packaging.dll" + "NuGet.Versioning.dll" + "Paket.Core.dll" + "System.Buffers.dll" + "System.Configuration.ConfigurationManager.dll" + "System.Memory.dll" + "System.Net.Http.WinHttpHandler.dll" + "System.Numerics.Vectors.dll" + "System.Runtime.CompilerServices.Unsafe.dll" + "System.Security.Cryptography.Cng.dll" + "System.Security.Cryptography.Pkcs.dll" + "System.Threading.Tasks.Extensions.dll" ] |> List.map inBuildDirNet461 |> separated " " let result = - ExecProcess (fun info -> - info.FileName <- currentDirectory "packages" "build" "ILRepack" "tools" "ILRepack.exe" - info.Arguments <- sprintf "/copyattrs /lib:%s /ver:%s /out:%s %s %s" buildDirNet461 release.AssemblyVersion paketFile primaryExe mergeLibs - ) (TimeSpan.FromMinutes 5.) + ExecProcess + (fun info -> + info.FileName <- + currentDirectory + "packages" + "build" + "ILRepack" + "tools" + "ILRepack.exe" + + info.Arguments <- + sprintf + "/copyattrs /lib:%s /ver:%s /out:%s %s %s" + buildDirNet461 + release.AssemblyVersion + paketFile + primaryExe + mergeLibs) + (TimeSpan.FromMinutes 5.) + + if result <> 0 then + failwithf "Error during ILRepack execution.") - if result <> 0 then failwithf "Error during ILRepack execution." -) "Publish" ==> "MergePaketTool" Target "RunIntegrationTestsNet" (fun _ -> @@ -332,18 +334,24 @@ Target "RunIntegrationTestsNet" (fun _ -> // improves the speed of the test-suite by disabling the runtime resolution. System.Environment.SetEnvironmentVariable("PAKET_DISABLE_RUNTIME_RESOLUTION", "true") - DotNetCli.Test (fun c -> + DotNetCli.Test(fun c -> { c with Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj" Framework = "net461" AdditionalArgs = - [ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky") - sprintf "--logger:trx;LogFileName=%s" ("tests_result/net/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ] + [ "--filter" + (if testSuiteFilterFlakyTests then + "TestCategory=Flaky" + else + "TestCategory!=Flaky") + sprintf + "--logger:trx;LogFileName=%s" + ("tests_result/net/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ] TimeOut = TimeSpan.FromMinutes 60. - ToolPath = dotnetExePath - }) + ToolPath = dotnetExePath }) ) + "Clean" ==> "Publish" ==> "RunIntegrationTestsNet" @@ -352,17 +360,23 @@ Target "RunIntegrationTestsNetCore" (fun _ -> // improves the speed of the test-suite by disabling the runtime resolution. System.Environment.SetEnvironmentVariable("PAKET_DISABLE_RUNTIME_RESOLUTION", "true") - DotNetCli.Test (fun c -> + + DotNetCli.Test(fun c -> { c with Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj" - Framework = "netcoreapp3.1" + Framework = "net8" AdditionalArgs = - [ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky") - sprintf "--logger:trx;LogFileName=%s" ("tests_result/netcore/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ] + [ "--filter" + (if testSuiteFilterFlakyTests then + "TestCategory=Flaky" + else + "TestCategory!=Flaky") + sprintf + "--logger:trx;LogFileName=%s" + ("tests_result/netcore/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ] TimeOut = TimeSpan.FromMinutes 60. - ToolPath = dotnetExePath - }) -) + ToolPath = dotnetExePath })) + "Clean" ==> "Publish" ==> "RunIntegrationTestsNetCore" let pfx = "code-sign.pfx" @@ -395,16 +409,14 @@ Target "SignAssemblies" (fun _ -> // info.Arguments <- args) System.TimeSpan.MaxValue // if result <> 0 then failwithf "Error during signing %s with %s" executable pfx) // | _ -> failwith "PW for cert missing" - () -) + ()) Target "CalculateDownloadHash" (fun _ -> use stream = File.OpenRead(paketFile) use sha = new SHA256Managed() let checksum = sha.ComputeHash(stream) let hash = BitConverter.ToString(checksum).Replace("-", String.Empty) - File.WriteAllText(buildMergedDir @@ "paket-sha256.txt", sprintf "%s paket.exe" hash) -) + File.WriteAllText(buildMergedDir @@ "paket-sha256.txt", sprintf "%s paket.exe" hash)) Target "AddIconToExe" (fun _ -> // add icon to paket.exe @@ -412,59 +424,69 @@ Target "AddIconToExe" (fun _ -> let paketExeIcon = "src" @@ "Paket" @@ "paket.ico" // use resourcehacker to add the icon - let rhPath = "paket-files" @@ "build" @@ "enricosada" @@ "add_icon_to_exe" @@ "rh" @@ "ResourceHacker.exe" - let args = sprintf """-open "%s" -save "%s" -action addskip -res "%s" -mask ICONGROUP,MAINICON,""" paketFile paketFile paketExeIcon + let rhPath = + "paket-files" + @@ "build" + @@ "enricosada" + @@ "add_icon_to_exe" + @@ "rh" + @@ "ResourceHacker.exe" + + let args = + sprintf + """-open "%s" -save "%s" -action addskip -res "%s" -mask ICONGROUP,MAINICON,""" + paketFile + paketFile + paketExeIcon let result = - ExecProcess (fun info -> - info.FileName <- rhPath - info.Arguments <- args) (TimeSpan.FromMinutes 1.) - if result <> 0 then failwithf "Error during adding icon %s to %s with %s %s" paketExeIcon paketFile rhPath args -) + ExecProcess + (fun info -> + info.FileName <- rhPath + info.Arguments <- args) + (TimeSpan.FromMinutes 1.) + + if result <> 0 then + failwithf "Error during adding icon %s to %s with %s %s" paketExeIcon paketFile rhPath args) Target "NuGet" (fun _ -> - DotNetCli.Pack (fun c -> + DotNetCli.Pack(fun c -> { c with Project = "src/Paket.Core/Paket.Core.fsproj" OutputPath = tempDir AdditionalArgs = packageProps - ToolPath = dotnetExePath - }) + ToolPath = dotnetExePath }) - DotNetCli.Pack (fun c -> + DotNetCli.Pack(fun c -> { c with Project = "src/Paket/Paket.fsproj" OutputPath = tempDir AdditionalArgs = packageProps @ [ "/p:PackAsTool=true" ] - ToolPath = dotnetExePath - }) - DotNetCli.Pack (fun c -> + ToolPath = dotnetExePath }) + + DotNetCli.Pack(fun c -> { c with Project = "src/Paket.Bootstrapper/Paket.Bootstrapper.csproj" OutputPath = tempDir AdditionalArgs = packageProps @ [ "/p:PackAsTool=true" ] - ToolPath = dotnetExePath - }) - DotNetCli.Pack (fun c -> + ToolPath = dotnetExePath }) + + DotNetCli.Pack(fun c -> { c with Project = "src/FSharp.DependencyManager.Paket/FSharp.DependencyManager.Paket.fsproj" OutputPath = tempDir AdditionalArgs = packageProps - ToolPath = dotnetExePath - }) -) + ToolPath = dotnetExePath })) Target "PublishNuGet" (fun _ -> if hasBuildParam "PublishBootstrapper" |> not then - !! (tempDir "*bootstrapper*") - |> Seq.iter File.Delete + !!(tempDir "*bootstrapper*") |> Seq.iter File.Delete - Paket.Push (fun p -> + Paket.Push(fun p -> { p with ToolPath = "bin/merged/paket.exe" ApiKey = getBuildParam "NugetKey" - WorkingDir = tempDir }) -) + WorkingDir = tempDir })) // -------------------------------------------------------------------------------------- @@ -472,16 +494,19 @@ Target "PublishNuGet" (fun _ -> let disableDocs = false // https://github.com/fsprojects/FSharp.Formatting/issues/461 -let fakePath = __SOURCE_DIRECTORY__ @@ "packages" @@ "build" @@ "FAKE" @@ "tools" @@ "FAKE.exe" +let fakePath = + __SOURCE_DIRECTORY__ @@ "packages" @@ "build" @@ "FAKE" @@ "tools" @@ "FAKE.exe" + let fakeStartInfo fsiargs script workingDirectory args environmentVars = (fun (info: System.Diagnostics.ProcessStartInfo) -> info.FileName <- fakePath info.Arguments <- sprintf "%s --fsiargs %s -d:FAKE \"%s\"" args fsiargs script info.WorkingDirectory <- workingDirectory - let setVar k v = - info.EnvironmentVariables.[k] <- v + let setVar k v = info.EnvironmentVariables.[k] <- v + for (k, v) in environmentVars do setVar k v + setVar "MSBuild" msBuildExe setVar "GIT" Git.CommandHelper.gitPath setVar "FSI" fsiPath) @@ -490,18 +515,16 @@ let fakeStartInfo fsiargs script workingDirectory args environmentVars = /// Run the given startinfo by printing the output (live) let executeWithOutput configStartInfo = let exitCode = - ExecProcessWithLambdas - configStartInfo - TimeSpan.MaxValue false ignore ignore + ExecProcessWithLambdas configStartInfo TimeSpan.MaxValue false ignore ignore + System.Threading.Thread.Sleep 1000 exitCode /// Run the given startinfo by redirecting the output (live) let executeWithRedirect errorF messageF configStartInfo = let exitCode = - ExecProcessWithLambdas - configStartInfo - TimeSpan.MaxValue true errorF messageF + ExecProcessWithLambdas configStartInfo TimeSpan.MaxValue true errorF messageF + System.Threading.Thread.Sleep 1000 exitCode @@ -509,6 +532,7 @@ let executeWithRedirect errorF messageF configStartInfo = let executeHelper executer fail traceMsg failMessage configStartInfo = trace traceMsg let exit = executer configStartInfo + if exit <> 0 then if fail then failwith failMessage @@ -516,20 +540,23 @@ let executeHelper executer fail traceMsg failMessage configStartInfo = traceImportant failMessage else traceImportant "Succeeded" + () let execute = executeHelper executeWithOutput Target "GenerateReferenceDocs" (fun _ -> - if disableDocs then () else - let args = ["--define:RELEASE"; "--define:REFERENCE"] - let argLine = System.String.Join(" ", args) - execute - true - (sprintf "Building reference documentation, this could take some time, please wait...") - "generating reference documentation failed" - (fakeStartInfo argLine "generate.fsx" "docs/tools" "" []) -) + if disableDocs then + () + else + let args = [ "--define:RELEASE"; "--define:REFERENCE" ] + let argLine = System.String.Join(" ", args) + + execute + true + (sprintf "Building reference documentation, this could take some time, please wait...") + "generating reference documentation failed" + (fakeStartInfo argLine "generate.fsx" "docs/tools" "" [])) @@ -537,62 +564,65 @@ Target "GenerateReferenceDocs" (fun _ -> let generateHelp' commands fail debug = // remove FSharp.Compiler.Service.MSBuild.v12.dll // otherwise FCS thinks it should use msbuild, which leads to insanity - !! "packages/**/FSharp.Compiler.Service.MSBuild.*.dll" - |> DeleteFiles + !! "packages/**/FSharp.Compiler.Service.MSBuild.*.dll" |> DeleteFiles let args = - [ if not debug then yield "--define:RELEASE" - if commands then yield "--define:COMMANDS" - yield "--define:HELP"] + [ if not debug then + yield "--define:RELEASE" + if commands then + yield "--define:COMMANDS" + yield "--define:HELP" ] + let argLine = System.String.Join(" ", args) + execute - fail - (sprintf "Building documentation (%A), this could take some time, please wait..." commands) - "generating documentation failed" - (fakeStartInfo argLine "generate.fsx" "docs/tools" "" []) + fail + (sprintf "Building documentation (%A), this could take some time, please wait..." commands) + "generating documentation failed" + (fakeStartInfo argLine "generate.fsx" "docs/tools" "" []) CleanDir "docs/output/commands" -let generateHelp commands fail = - generateHelp' commands fail false +let generateHelp commands fail = generateHelp' commands fail false Target "GenerateHelp" (fun _ -> - if disableDocs then () else - DeleteFile "docs/content/release-notes.md" - CopyFile "docs/content/" "RELEASE_NOTES.md" - Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + if disableDocs then + () + else + DeleteFile "docs/content/release-notes.md" + CopyFile "docs/content/" "RELEASE_NOTES.md" + Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" - DeleteFile "docs/content/license.md" - CopyFile "docs/content/" "LICENSE.txt" - Rename "docs/content/license.md" "docs/content/LICENSE.txt" + DeleteFile "docs/content/license.md" + CopyFile "docs/content/" "LICENSE.txt" + Rename "docs/content/license.md" "docs/content/LICENSE.txt" - generateHelp true true -) + generateHelp true true) Target "GenerateHelpDebug" (fun _ -> - if disableDocs then () else - DeleteFile "docs/content/release-notes.md" - CopyFile "docs/content/" "RELEASE_NOTES.md" - Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + if disableDocs then + () + else + DeleteFile "docs/content/release-notes.md" + CopyFile "docs/content/" "RELEASE_NOTES.md" + Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" - DeleteFile "docs/content/license.md" - CopyFile "docs/content/" "LICENSE.txt" - Rename "docs/content/license.md" "docs/content/LICENSE.txt" + DeleteFile "docs/content/license.md" + CopyFile "docs/content/" "LICENSE.txt" + Rename "docs/content/license.md" "docs/content/LICENSE.txt" - generateHelp' true true true -) + generateHelp' true true true) Target "KeepRunning" (fun _ -> - use watcher = !! "docs/content/**/*.*" |> WatchChanges (fun changes -> - generateHelp false false - ) + use watcher = + !! "docs/content/**/*.*" + |> WatchChanges(fun changes -> generateHelp false false) traceImportant "Waiting for help edits. Press any key to stop." System.Console.ReadKey() |> ignore - watcher.Dispose() -) + watcher.Dispose()) Target "GenerateDocs" DoNothing @@ -600,21 +630,29 @@ Target "GenerateDocs" DoNothing // Release Scripts Target "ReleaseDocs" (fun _ -> - if disableDocs then () else - let tempDocsDir = "temp/gh-pages" - CleanDir tempDocsDir - Repository.cloneSingleBranch "" "git@github.com:fsprojects/Paket.git" "gh-pages" tempDocsDir + if disableDocs then + () + else + let tempDocsDir = "temp/gh-pages" + CleanDir tempDocsDir + Repository.cloneSingleBranch "" "git@github.com:fsprojects/Paket.git" "gh-pages" tempDocsDir + + Git.CommandHelper.runSimpleGitCommand tempDocsDir "rm . -f -r" |> ignore + CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A" - Git.CommandHelper.runSimpleGitCommand tempDocsDir "rm . -f -r" |> ignore - CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A" + File.WriteAllText( + "temp/gh-pages/latest", + sprintf "https://github.com/fsprojects/Paket/releases/download/%s/paket.exe" release.NugetVersion + ) - File.WriteAllText("temp/gh-pages/latest",sprintf "https://github.com/fsprojects/Paket/releases/download/%s/paket.exe" release.NugetVersion) - File.WriteAllText("temp/gh-pages/stable",sprintf "https://github.com/fsprojects/Paket/releases/download/%s/paket.exe" stable.NugetVersion) + File.WriteAllText( + "temp/gh-pages/stable", + sprintf "https://github.com/fsprojects/Paket/releases/download/%s/paket.exe" stable.NugetVersion + ) - StageAll tempDocsDir - Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) - Branches.push tempDocsDir -) + StageAll tempDocsDir + Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) + Branches.push tempDocsDir) #load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx" open Octokit @@ -625,22 +663,29 @@ Target "ReleaseGitHub" (fun _ -> | s when not (String.IsNullOrWhiteSpace s) -> s | _ -> eprintfn "Please update your release script to set 'github_user'!" + match getBuildParam "github-user" with | s when not (String.IsNullOrWhiteSpace s) -> s | _ -> getUserInput "Username: " + let pw = match getBuildParam "github_password" with | s when not (String.IsNullOrWhiteSpace s) -> s | _ -> eprintfn "Please update your release script to set 'github_password'!" + match getBuildParam "github_pw", getBuildParam "github-pw" with - | s, _ | _, s when not (String.IsNullOrWhiteSpace s) -> s + | s, _ + | _, s when not (String.IsNullOrWhiteSpace s) -> s | _ -> getUserPassword "Password: " + let remote = Git.CommandHelper.getGitResult "" "remote -v" |> Seq.filter (fun (s: string) -> s.EndsWith("(push)")) |> Seq.tryFind (fun (s: string) -> s.Contains(gitOwner + "/" + gitName)) - |> function None -> gitHome + "/" + gitName | Some (s: string) -> s.Split().[0] + |> function + | None -> gitHome + "/" + gitName + | Some(s: string) -> s.Split().[0] StageAll "" Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion) @@ -661,10 +706,12 @@ Target "ReleaseGitHub" (fun _ -> |> uploadFile ".paket/paket.targets" |> uploadFile ".paket/Paket.Restore.targets" |> uploadFile (tempDir sprintf "Paket.%s.nupkg" (release.NugetVersion)) - |> uploadFile (tempDir sprintf "FSharp.DependencyManager.Paket.%s.nupkg" (release.NugetVersion)) + |> uploadFile ( + tempDir + sprintf "FSharp.DependencyManager.Paket.%s.nupkg" (release.NugetVersion) + ) |> releaseDraft - |> Async.RunSynchronously -) + |> Async.RunSynchronously) Target "Release" DoNothing @@ -673,59 +720,42 @@ Target "BuildPackage" DoNothing // Run all targets by default. Invoke 'build ' to override let hasBuildParams buildParams = - buildParams - |> List.map hasBuildParam - |> List.exists id -let unlessBuildParams buildParams = - not (hasBuildParams buildParams) + buildParams |> List.map hasBuildParam |> List.exists id + +let unlessBuildParams buildParams = not (hasBuildParams buildParams) Target "All" DoNothing -"Clean" - ==> "InstallDotNetCore" - ==> "Restore" - ==> "Build" - ==> "Publish" - =?> ("RunTests", unlessBuildParams [ "SkipTests"; "SkipUnitTests" ]) - =?> ("GenerateReferenceDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) - =?> ("GenerateDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) - ==> "All" - =?> ("ReleaseDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) - -"All" - ==> "MergePaketTool" - =?> ("AddIconToExe", not isMono) - =?> ("RunIntegrationTestsNet", unlessBuildParams [ "SkipTests"; "SkipIntegrationTests"; "SkipIntegrationTestsNet" ] ) - =?> ("RunIntegrationTestsNetCore", unlessBuildParams [ "SkipTests"; "SkipIntegrationTests"; "SkipIntegrationTestsNetCore" ] ) - ==> "SignAssemblies" - ==> "CalculateDownloadHash" - =?> ("NuGet", unlessBuildParams [ "SkipNuGet" ]) - ==> "BuildPackage" - -"EnsurePackageSigned" - ?=> "SignAssemblies" - - -"CleanDocs" - ==> "GenerateHelp" - ==> "GenerateReferenceDocs" - ==> "GenerateDocs" - -"CleanDocs" - ==> "GenerateHelpDebug" - -"GenerateHelp" - ==> "KeepRunning" - -"BuildPackage" - ==> "PublishNuGet" - -"ReleaseGitHub" - ==> "ReleaseDocs" - ==> "PublishNuGet" - ==> "Release" - -"EnsurePackageSigned" - ==> "Release" +"Clean" ==> "InstallDotNetCore" ==> "Restore" ==> "Build" ==> "Publish" +=?> ("RunTests", unlessBuildParams [ "SkipTests"; "SkipUnitTests" ]) +=?> ("GenerateReferenceDocs", isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) +=?> ("GenerateDocs", isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) +==> "All" +=?> ("ReleaseDocs", isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) + +"All" ==> "MergePaketTool" +=?> ("AddIconToExe", not isMono) +=?> ("RunIntegrationTestsNet", unlessBuildParams [ "SkipTests"; "SkipIntegrationTests"; "SkipIntegrationTestsNet" ]) +=?> ("RunIntegrationTestsNetCore", + unlessBuildParams [ "SkipTests"; "SkipIntegrationTests"; "SkipIntegrationTestsNetCore" ]) +==> "SignAssemblies" +==> "CalculateDownloadHash" +=?> ("NuGet", unlessBuildParams [ "SkipNuGet" ]) +==> "BuildPackage" + +"EnsurePackageSigned" ?=> "SignAssemblies" + + +"CleanDocs" ==> "GenerateHelp" ==> "GenerateReferenceDocs" ==> "GenerateDocs" + +"CleanDocs" ==> "GenerateHelpDebug" + +"GenerateHelp" ==> "KeepRunning" + +"BuildPackage" ==> "PublishNuGet" + +"ReleaseGitHub" ==> "ReleaseDocs" ==> "PublishNuGet" ==> "Release" + +"EnsurePackageSigned" ==> "Release" RunTargetOrDefault "All" From 5668e58b4461b033089457e49799061a3cad98a8 Mon Sep 17 00:00:00 2001 From: 1eyewonder Date: Tue, 28 Jan 2025 11:24:41 -0600 Subject: [PATCH 6/8] `dotnet paket remove Microsoft.NETCore.App` --- paket.dependencies | 1 - paket.lock | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index dfdcbd4c83..42584c1358 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -12,7 +12,6 @@ nuget Mono.Cecil ~> 0.11.1 nuget System.Security.Cryptography.ProtectedData >= 4.4 nuget NETStandard.Library ~> 2.0 -nuget Microsoft.NETCore.App ~> 2.1 nuget System.Net.Http.WinHttpHandler >= 4.5 nuget Nuget.Packaging nuget Microsoft.Win32.Registry diff --git a/paket.lock b/paket.lock index 94e07d9469..28db5015f2 100644 --- a/paket.lock +++ b/paket.lock @@ -68,18 +68,8 @@ NUGET System.ComponentModel.Primitives (>= 4.1) - restriction: >= uap10.0 System.ComponentModel.TypeConverter (>= 4.1) - restriction: >= uap10.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: >= uap10.0 - Microsoft.NETCore.App (2.2.8) - Microsoft.NETCore.DotNetHostPolicy (>= 2.2.8) - restriction: >= netcoreapp2.2 - Microsoft.NETCore.Platforms (>= 2.2.4) - restriction: >= netcoreapp2.2 - Microsoft.NETCore.Targets (>= 2.0) - restriction: >= netcoreapp2.2 - NETStandard.Library (>= 2.0.3) - restriction: >= netcoreapp2.2 - Microsoft.NETCore.DotNetAppHost (3.1.8) - restriction: >= netcoreapp2.2 - Microsoft.NETCore.DotNetHostPolicy (3.1.8) - restriction: >= netcoreapp2.2 - Microsoft.NETCore.DotNetHostResolver (>= 3.1.8) - Microsoft.NETCore.DotNetHostResolver (3.1.8) - restriction: >= netcoreapp2.2 - Microsoft.NETCore.DotNetAppHost (>= 3.1.8) Microsoft.NETCore.Platforms (5.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.2) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.5) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (&& (>= netcoreapp1.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netcoreapp2.0) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (>= netstandard1.1) (< portable-net45+win8+wpa81)) (&& (< netstandard1.1) (>= uap10.0) (< win8)) (&& (>= netstandard1.2) (< portable-net45+win8+wpa81)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (>= netstandard1.3) (< portable-net45+win8+wpa81)) (&& (< netstandard1.3) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (>= netstandard1.5) (< portable-net45+win8+wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) - Microsoft.NETCore.Targets (3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.2) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.5) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (>= netcoreapp2.2) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (>= netstandard1.1) (< portable-net45+win8+wpa81)) (&& (< netstandard1.1) (>= uap10.0) (< win8)) (&& (>= netstandard1.2) (< portable-net45+win8+wpa81)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (>= netstandard1.3) (< portable-net45+win8+wpa81)) (&& (< netstandard1.3) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< portable-net45+win8+wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< win81) (< wpa81)) + Microsoft.NETCore.Targets (3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.4) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.2) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.3) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.4) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.5) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (>= netstandard1.1) (< portable-net45+win8+wpa81)) (&& (< netstandard1.1) (>= uap10.0) (< win8)) (&& (>= netstandard1.2) (< portable-net45+win8+wpa81)) (&& (< netstandard1.2) (>= uap10.0) (< win8)) (&& (>= netstandard1.3) (< portable-net45+win8+wpa81)) (&& (< netstandard1.3) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.5) (< portable-net45+win8+wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) (&& (< netstandard1.5) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< win81) (< wpa81)) Microsoft.NETFramework.ReferenceAssemblies.net461 (1.0.3) - copy_local: true Microsoft.SourceLink.AzureRepos.Git (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) From fad6af750895c05cffcf2af294351ceb3d8763f7 Mon Sep 17 00:00:00 2001 From: 1eyewonder Date: Tue, 28 Jan 2025 13:40:39 -0600 Subject: [PATCH 7/8] Updated test helpers to look in the correct path --- integrationtests/Paket.IntegrationTests/TestHelper.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrationtests/Paket.IntegrationTests/TestHelper.fs b/integrationtests/Paket.IntegrationTests/TestHelper.fs index 61b7181710..7a24420acd 100644 --- a/integrationtests/Paket.IntegrationTests/TestHelper.fs +++ b/integrationtests/Paket.IntegrationTests/TestHelper.fs @@ -21,14 +21,14 @@ let dotnetToolPath = let paketToolPath = #if PAKET_NETCORE - dotnetToolPath, FullName(__SOURCE_DIRECTORY__ + "../../../bin/netcoreapp2.1/paket.dll") + dotnetToolPath, FullName(__SOURCE_DIRECTORY__ + "../../../bin/net8/paket.dll") #else "", FullName(__SOURCE_DIRECTORY__ + "../../../bin/net461/paket.exe") #endif let paketBootstrapperToolPath = #if PAKET_NETCORE - dotnetToolPath, FullName(__SOURCE_DIRECTORY__ + "../../../bin_bootstrapper/netcoreapp2.1/paket.bootstrapper.dll") + dotnetToolPath, FullName(__SOURCE_DIRECTORY__ + "../../../bin_bootstrapper/net8/paket.bootstrapper.dll") #else "", FullName(__SOURCE_DIRECTORY__ + "../../../bin_bootstrapper/net461/paket.bootstrapper.exe") #endif From 6dfd384b0265caaf7e3ff27d78babe72972b9a93 Mon Sep 17 00:00:00 2001 From: 1eyewonder Date: Tue, 28 Jan 2025 21:18:54 -0600 Subject: [PATCH 8/8] Reverted formatting in build.fsx --- build.fsx | 582 ++++++++++++++++++++++++++---------------------------- 1 file changed, 276 insertions(+), 306 deletions(-) diff --git a/build.fsx b/build.fsx index 0121b9e103..3767669310 100644 --- a/build.fsx +++ b/build.fsx @@ -27,13 +27,11 @@ let project = "Paket" // Short summary of the project // (used as description in AssemblyInfo and as a short summary for NuGet package) -let summary = - "A dependency manager for .NET with support for NuGet packages and git repositories." +let summary = "A dependency manager for .NET with support for NuGet packages and git repositories." // Longer description of the project // (used as a description for NuGet package; line breaks are automatically cleaned up) -let description = - "A dependency manager for .NET with support for NuGet packages and git repositories." +let description = "A dependency manager for .NET with support for NuGet packages and git repositories." // List of author names (for NuGet package) let authors = [ "Paket team" ] @@ -46,9 +44,7 @@ let solutionFile = "Paket.sln" // Pattern specifying assemblies to be tested using NUnit let testAssemblies = "tests/**/bin/Release/net461/*Tests*.dll" - -let integrationTestAssemblies = - "integrationtests/Paket.IntegrationTests/bin/Release/net461/*Tests*.dll" +let integrationTestAssemblies = "integrationtests/Paket.IntegrationTests/bin/Release/net461/*Tests*.dll" // Git configuration (used for publishing documentation in gh-pages branch) // The profile where the project is posted @@ -84,7 +80,9 @@ Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ System.Net.ServicePointManager.SecurityProtocol <- unbox 192 ||| unbox 768 ||| unbox 3072 ||| unbox 48 // Read additional information from the release notes document -let releaseNotesData = File.ReadAllLines "RELEASE_NOTES.md" |> parseAllReleaseNotes +let releaseNotesData = + File.ReadAllLines "RELEASE_NOTES.md" + |> parseAllReleaseNotes let release = List.head releaseNotesData @@ -96,22 +94,19 @@ let stable = let runDotnet workingDir args = let result = - ExecProcess - (fun info -> - info.FileName <- dotnetExePath - info.WorkingDirectory <- workingDir - info.Arguments <- args) - TimeSpan.MaxValue - + ExecProcess (fun info -> + info.FileName <- dotnetExePath + info.WorkingDirectory <- workingDir + info.Arguments <- args) TimeSpan.MaxValue if result <> 0 then failwithf "dotnet %s failed" args -let testSuiteFilterFlakyTests = - getEnvironmentVarAsBoolOrDefault "PAKET_TESTSUITE_FLAKYTESTS" false +let testSuiteFilterFlakyTests = getEnvironmentVarAsBoolOrDefault "PAKET_TESTSUITE_FLAKYTESTS" false Target "InstallDotNetCore" (fun _ -> dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion - Environment.SetEnvironmentVariable("DOTNET_EXE_PATH", dotnetExePath)) + Environment.SetEnvironmentVariable("DOTNET_EXE_PATH", dotnetExePath) +) // -------------------------------------------------------------------------------------- // Clean build results @@ -128,9 +123,13 @@ Target "Clean" (fun _ -> ++ tempDir |> CleanDirs - !! "**/obj/**/*.nuspec" |> DeleteFiles) + !! "**/obj/**/*.nuspec" + |> DeleteFiles +) -Target "CleanDocs" (fun _ -> CleanDirs [ "docs/output" ]) +Target "CleanDocs" (fun _ -> + CleanDirs ["docs/output"] +) // -------------------------------------------------------------------------------------- // Build library & test project @@ -138,11 +137,14 @@ Target "CleanDocs" (fun _ -> CleanDirs [ "docs/output" ]) let releaseNotesProp releaseNotesLines = let xn name = XName.Get(name) let text = releaseNotesLines |> String.concat Environment.NewLine - let doc = XDocument( [ XComment("This document was automatically generated.") :> obj - XElement(xn "Project", XElement(xn "PropertyGroup", XElement(xn "PackageReleaseNotes", text))) :> obj ] + XElement(xn "Project", + XElement(xn "PropertyGroup", + XElement(xn "PackageReleaseNotes", text) + ) + ) :> obj ] ) let path = Path.GetTempFileName() @@ -151,61 +153,76 @@ let releaseNotesProp releaseNotesLines = let releaseNotesPath = releaseNotesProp release.Notes -let packageProps = - [ sprintf "/p:Version=%s" release.NugetVersion - sprintf "/p:PackageReleaseNotesFile=\"%s\"" releaseNotesPath ] +let packageProps = [ + sprintf "/p:Version=%s" release.NugetVersion + sprintf "/p:PackageReleaseNotesFile=\"%s\"" releaseNotesPath +] Target "Build" (fun _ -> - DotNetCli.Build(fun c -> + DotNetCli.Build (fun c -> { c with Project = solutionFile ToolPath = dotnetExePath - AdditionalArgs = packageProps })) + AdditionalArgs = packageProps + }) +) Target "Restore" (fun _ -> - DotNetCli.RunCommand (fun c -> { c with ToolPath = dotnetExePath }) "tool restore" + DotNetCli.RunCommand (fun c -> + { c with + ToolPath = dotnetExePath + }) "tool restore" - DotNetCli.Restore(fun c -> + DotNetCli.Restore (fun c -> { c with Project = "Paket.sln" - ToolPath = dotnetExePath })) + ToolPath = dotnetExePath + }) +) Target "Publish" (fun _ -> - let publishArgs = [ "--no-build" ] // since no build, we have to ensure that the build sets assemblyinfo correctly, especially because the publish output of this step - // is used in the ILRepack of the .net executable + let publishArgs = + [ + "--no-build" + ] // since no build, we have to ensure that the build sets assemblyinfo correctly, especially because the publish output of this step + // is used in the ILRepack of the .net executable - DotNetCli.Publish(fun c -> + DotNetCli.Publish (fun c -> { c with Project = "src/Paket" Framework = "net461" - Output = FullName(currentDirectory buildDirNet461) + Output = FullName (currentDirectory buildDirNet461) ToolPath = dotnetExePath - AdditionalArgs = publishArgs }) + AdditionalArgs = publishArgs + }) - DotNetCli.Publish(fun c -> + DotNetCli.Publish (fun c -> { c with Project = "src/Paket" Framework = "net8" - Output = FullName(currentDirectory buildDirNetCore) + Output = FullName (currentDirectory buildDirNetCore) ToolPath = dotnetExePath - AdditionalArgs = publishArgs }) + AdditionalArgs = publishArgs + }) - DotNetCli.Publish(fun c -> + DotNetCli.Publish (fun c -> { c with Project = "src/Paket.Bootstrapper" Framework = "net461" - Output = FullName(currentDirectory buildDirBootstrapperNet461) + Output = FullName (currentDirectory buildDirBootstrapperNet461) ToolPath = dotnetExePath - AdditionalArgs = publishArgs }) + AdditionalArgs = publishArgs + }) - DotNetCli.Publish(fun c -> + DotNetCli.Publish (fun c -> { c with Project = "src/Paket.Bootstrapper" Framework = "net8" - Output = FullName(currentDirectory buildDirBootstrapperNetCore) + Output = FullName (currentDirectory buildDirBootstrapperNetCore) ToolPath = dotnetExePath - AdditionalArgs = publishArgs })) - + AdditionalArgs = publishArgs + }) +) "Clean" ==> "Build" ?=> "Publish" // -------------------------------------------------------------------------------------- @@ -214,55 +231,50 @@ Target "Publish" (fun _ -> Target "RunTests" (fun _ -> let runTest fw proj tfm = - CreateDir(sprintf "tests_result/%s/%s" fw proj) + CreateDir (sprintf "tests_result/%s/%s" fw proj) - let logFilePath = - (sprintf "tests_result/%s/%s/TestResult.trx" fw proj) |> Path.GetFullPath + let logFilePath = (sprintf "tests_result/%s/%s/TestResult.trx" fw proj) |> Path.GetFullPath - DotNetCli.Test(fun c -> + DotNetCli.Test (fun c -> { c with Project = "tests/Paket.Tests/Paket.Tests.fsproj" Framework = tfm AdditionalArgs = - [ "--filter" - (if testSuiteFilterFlakyTests then - "TestCategory=Flaky" - else - "TestCategory!=Flaky") - sprintf "--logger:trx;LogFileName=%s" logFilePath - "--no-build" - "-v" - "n" ] - ToolPath = dotnetExePath }) + [ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky") + sprintf "--logger:trx;LogFileName=%s" logFilePath + "--no-build" + "-v"; "n"] + ToolPath = dotnetExePath + }) runTest "net" "Paket.Tests" "net461" - runTest "netcore" "Paket.Tests" "net8" + runTest "netcore" "Paket.Tests" "netcoreapp3.0" runTest "net" "Paket.Bootstrapper.Tests" "net461" - runTest "netcore" "Paket.Bootstrapper.Tests" "net8") + runTest "netcore" "Paket.Bootstrapper.Tests" "netcoreapp3.0" +) Target "QuickTest" (fun _ -> - DotNetCli.Test(fun c -> + DotNetCli.Test (fun c -> { c with Project = "tests/Paket.Tests/Paket.Tests.fsproj" AdditionalArgs = - [ "--filter" - (if testSuiteFilterFlakyTests then - "TestCategory=Flaky" - else - "TestCategory!=Flaky") ] - ToolPath = dotnetExePath })) - + [ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky") ] + ToolPath = dotnetExePath + }) +) "Clean" ==> "QuickTest" Target "QuickIntegrationTests" (fun _ -> - DotNetCli.Test(fun c -> + DotNetCli.Test (fun c -> { c with Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj" - AdditionalArgs = [ "--filter"; "TestCategory=scriptgen" ] + AdditionalArgs = + [ "--filter"; "TestCategory=scriptgen" ] TimeOut = TimeSpan.FromMinutes 40. - ToolPath = dotnetExePath })) - + ToolPath = dotnetExePath + }) +) "Clean" ==> "Publish" ==> "QuickIntegrationTests" @@ -278,54 +290,40 @@ Target "MergePaketTool" (fun _ -> let primaryExe = inBuildDirNet461 "paket.exe" let mergeLibs = - [ "Argu.dll" - "Chessie.dll" - "Fake.Core.ReleaseNotes.dll" - "FSharp.Core.dll" - "Mono.Cecil.dll" - "Newtonsoft.Json.dll" - "NuGet.Common.dll" - "NuGet.Configuration.dll" - "NuGet.Frameworks.dll" - "NuGet.Packaging.dll" - "NuGet.Versioning.dll" - "Paket.Core.dll" - "System.Buffers.dll" - "System.Configuration.ConfigurationManager.dll" - "System.Memory.dll" - "System.Net.Http.WinHttpHandler.dll" - "System.Numerics.Vectors.dll" - "System.Runtime.CompilerServices.Unsafe.dll" - "System.Security.Cryptography.Cng.dll" - "System.Security.Cryptography.Pkcs.dll" - "System.Threading.Tasks.Extensions.dll" ] + [ + "Argu.dll" + "Chessie.dll" + "Fake.Core.ReleaseNotes.dll" + "FSharp.Core.dll" + "Mono.Cecil.dll" + "Newtonsoft.Json.dll" + "NuGet.Common.dll" + "NuGet.Configuration.dll" + "NuGet.Frameworks.dll" + "NuGet.Packaging.dll" + "NuGet.Versioning.dll" + "Paket.Core.dll" + "System.Buffers.dll" + "System.Configuration.ConfigurationManager.dll" + "System.Memory.dll" + "System.Net.Http.WinHttpHandler.dll" + "System.Numerics.Vectors.dll" + "System.Runtime.CompilerServices.Unsafe.dll" + "System.Security.Cryptography.Cng.dll" + "System.Security.Cryptography.Pkcs.dll" + "System.Threading.Tasks.Extensions.dll" + ] |> List.map inBuildDirNet461 |> separated " " let result = - ExecProcess - (fun info -> - info.FileName <- - currentDirectory - "packages" - "build" - "ILRepack" - "tools" - "ILRepack.exe" - - info.Arguments <- - sprintf - "/copyattrs /lib:%s /ver:%s /out:%s %s %s" - buildDirNet461 - release.AssemblyVersion - paketFile - primaryExe - mergeLibs) - (TimeSpan.FromMinutes 5.) - - if result <> 0 then - failwithf "Error during ILRepack execution.") + ExecProcess (fun info -> + info.FileName <- currentDirectory "packages" "build" "ILRepack" "tools" "ILRepack.exe" + info.Arguments <- sprintf "/copyattrs /lib:%s /ver:%s /out:%s %s %s" buildDirNet461 release.AssemblyVersion paketFile primaryExe mergeLibs + ) (TimeSpan.FromMinutes 5.) + if result <> 0 then failwithf "Error during ILRepack execution." +) "Publish" ==> "MergePaketTool" Target "RunIntegrationTestsNet" (fun _ -> @@ -334,24 +332,18 @@ Target "RunIntegrationTestsNet" (fun _ -> // improves the speed of the test-suite by disabling the runtime resolution. System.Environment.SetEnvironmentVariable("PAKET_DISABLE_RUNTIME_RESOLUTION", "true") - DotNetCli.Test(fun c -> + DotNetCli.Test (fun c -> { c with Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj" Framework = "net461" AdditionalArgs = - [ "--filter" - (if testSuiteFilterFlakyTests then - "TestCategory=Flaky" - else - "TestCategory!=Flaky") - sprintf - "--logger:trx;LogFileName=%s" - ("tests_result/net/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ] + [ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky") + sprintf "--logger:trx;LogFileName=%s" ("tests_result/net/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ] TimeOut = TimeSpan.FromMinutes 60. - ToolPath = dotnetExePath }) + ToolPath = dotnetExePath + }) ) - "Clean" ==> "Publish" ==> "RunIntegrationTestsNet" @@ -360,23 +352,17 @@ Target "RunIntegrationTestsNetCore" (fun _ -> // improves the speed of the test-suite by disabling the runtime resolution. System.Environment.SetEnvironmentVariable("PAKET_DISABLE_RUNTIME_RESOLUTION", "true") - - DotNetCli.Test(fun c -> + DotNetCli.Test (fun c -> { c with Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj" Framework = "net8" AdditionalArgs = - [ "--filter" - (if testSuiteFilterFlakyTests then - "TestCategory=Flaky" - else - "TestCategory!=Flaky") - sprintf - "--logger:trx;LogFileName=%s" - ("tests_result/netcore/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ] + [ "--filter"; (if testSuiteFilterFlakyTests then "TestCategory=Flaky" else "TestCategory!=Flaky") + sprintf "--logger:trx;LogFileName=%s" ("tests_result/netcore/Paket.IntegrationTests/TestResult.trx" |> Path.GetFullPath) ] TimeOut = TimeSpan.FromMinutes 60. - ToolPath = dotnetExePath })) - + ToolPath = dotnetExePath + }) +) "Clean" ==> "Publish" ==> "RunIntegrationTestsNetCore" let pfx = "code-sign.pfx" @@ -409,14 +395,16 @@ Target "SignAssemblies" (fun _ -> // info.Arguments <- args) System.TimeSpan.MaxValue // if result <> 0 then failwithf "Error during signing %s with %s" executable pfx) // | _ -> failwith "PW for cert missing" - ()) + () +) Target "CalculateDownloadHash" (fun _ -> use stream = File.OpenRead(paketFile) use sha = new SHA256Managed() let checksum = sha.ComputeHash(stream) let hash = BitConverter.ToString(checksum).Replace("-", String.Empty) - File.WriteAllText(buildMergedDir @@ "paket-sha256.txt", sprintf "%s paket.exe" hash)) + File.WriteAllText(buildMergedDir @@ "paket-sha256.txt", sprintf "%s paket.exe" hash) +) Target "AddIconToExe" (fun _ -> // add icon to paket.exe @@ -424,69 +412,59 @@ Target "AddIconToExe" (fun _ -> let paketExeIcon = "src" @@ "Paket" @@ "paket.ico" // use resourcehacker to add the icon - let rhPath = - "paket-files" - @@ "build" - @@ "enricosada" - @@ "add_icon_to_exe" - @@ "rh" - @@ "ResourceHacker.exe" - - let args = - sprintf - """-open "%s" -save "%s" -action addskip -res "%s" -mask ICONGROUP,MAINICON,""" - paketFile - paketFile - paketExeIcon + let rhPath = "paket-files" @@ "build" @@ "enricosada" @@ "add_icon_to_exe" @@ "rh" @@ "ResourceHacker.exe" + let args = sprintf """-open "%s" -save "%s" -action addskip -res "%s" -mask ICONGROUP,MAINICON,""" paketFile paketFile paketExeIcon let result = - ExecProcess - (fun info -> - info.FileName <- rhPath - info.Arguments <- args) - (TimeSpan.FromMinutes 1.) - - if result <> 0 then - failwithf "Error during adding icon %s to %s with %s %s" paketExeIcon paketFile rhPath args) + ExecProcess (fun info -> + info.FileName <- rhPath + info.Arguments <- args) (TimeSpan.FromMinutes 1.) + if result <> 0 then failwithf "Error during adding icon %s to %s with %s %s" paketExeIcon paketFile rhPath args +) Target "NuGet" (fun _ -> - DotNetCli.Pack(fun c -> + DotNetCli.Pack (fun c -> { c with Project = "src/Paket.Core/Paket.Core.fsproj" OutputPath = tempDir AdditionalArgs = packageProps - ToolPath = dotnetExePath }) + ToolPath = dotnetExePath + }) - DotNetCli.Pack(fun c -> + DotNetCli.Pack (fun c -> { c with Project = "src/Paket/Paket.fsproj" OutputPath = tempDir AdditionalArgs = packageProps @ [ "/p:PackAsTool=true" ] - ToolPath = dotnetExePath }) - - DotNetCli.Pack(fun c -> + ToolPath = dotnetExePath + }) + DotNetCli.Pack (fun c -> { c with Project = "src/Paket.Bootstrapper/Paket.Bootstrapper.csproj" OutputPath = tempDir AdditionalArgs = packageProps @ [ "/p:PackAsTool=true" ] - ToolPath = dotnetExePath }) - - DotNetCli.Pack(fun c -> + ToolPath = dotnetExePath + }) + DotNetCli.Pack (fun c -> { c with Project = "src/FSharp.DependencyManager.Paket/FSharp.DependencyManager.Paket.fsproj" OutputPath = tempDir AdditionalArgs = packageProps - ToolPath = dotnetExePath })) + ToolPath = dotnetExePath + }) +) Target "PublishNuGet" (fun _ -> if hasBuildParam "PublishBootstrapper" |> not then - !!(tempDir "*bootstrapper*") |> Seq.iter File.Delete + !! (tempDir "*bootstrapper*") + |> Seq.iter File.Delete - Paket.Push(fun p -> + Paket.Push (fun p -> { p with ToolPath = "bin/merged/paket.exe" ApiKey = getBuildParam "NugetKey" - WorkingDir = tempDir })) + WorkingDir = tempDir }) +) // -------------------------------------------------------------------------------------- @@ -494,19 +472,16 @@ Target "PublishNuGet" (fun _ -> let disableDocs = false // https://github.com/fsprojects/FSharp.Formatting/issues/461 -let fakePath = - __SOURCE_DIRECTORY__ @@ "packages" @@ "build" @@ "FAKE" @@ "tools" @@ "FAKE.exe" - +let fakePath = __SOURCE_DIRECTORY__ @@ "packages" @@ "build" @@ "FAKE" @@ "tools" @@ "FAKE.exe" let fakeStartInfo fsiargs script workingDirectory args environmentVars = (fun (info: System.Diagnostics.ProcessStartInfo) -> info.FileName <- fakePath info.Arguments <- sprintf "%s --fsiargs %s -d:FAKE \"%s\"" args fsiargs script info.WorkingDirectory <- workingDirectory - let setVar k v = info.EnvironmentVariables.[k] <- v - + let setVar k v = + info.EnvironmentVariables.[k] <- v for (k, v) in environmentVars do setVar k v - setVar "MSBuild" msBuildExe setVar "GIT" Git.CommandHelper.gitPath setVar "FSI" fsiPath) @@ -515,16 +490,18 @@ let fakeStartInfo fsiargs script workingDirectory args environmentVars = /// Run the given startinfo by printing the output (live) let executeWithOutput configStartInfo = let exitCode = - ExecProcessWithLambdas configStartInfo TimeSpan.MaxValue false ignore ignore - + ExecProcessWithLambdas + configStartInfo + TimeSpan.MaxValue false ignore ignore System.Threading.Thread.Sleep 1000 exitCode /// Run the given startinfo by redirecting the output (live) let executeWithRedirect errorF messageF configStartInfo = let exitCode = - ExecProcessWithLambdas configStartInfo TimeSpan.MaxValue true errorF messageF - + ExecProcessWithLambdas + configStartInfo + TimeSpan.MaxValue true errorF messageF System.Threading.Thread.Sleep 1000 exitCode @@ -532,7 +509,6 @@ let executeWithRedirect errorF messageF configStartInfo = let executeHelper executer fail traceMsg failMessage configStartInfo = trace traceMsg let exit = executer configStartInfo - if exit <> 0 then if fail then failwith failMessage @@ -540,23 +516,20 @@ let executeHelper executer fail traceMsg failMessage configStartInfo = traceImportant failMessage else traceImportant "Succeeded" - () let execute = executeHelper executeWithOutput Target "GenerateReferenceDocs" (fun _ -> - if disableDocs then - () - else - let args = [ "--define:RELEASE"; "--define:REFERENCE" ] - let argLine = System.String.Join(" ", args) - - execute - true - (sprintf "Building reference documentation, this could take some time, please wait...") - "generating reference documentation failed" - (fakeStartInfo argLine "generate.fsx" "docs/tools" "" [])) + if disableDocs then () else + let args = ["--define:RELEASE"; "--define:REFERENCE"] + let argLine = System.String.Join(" ", args) + execute + true + (sprintf "Building reference documentation, this could take some time, please wait...") + "generating reference documentation failed" + (fakeStartInfo argLine "generate.fsx" "docs/tools" "" []) +) @@ -564,65 +537,62 @@ Target "GenerateReferenceDocs" (fun _ -> let generateHelp' commands fail debug = // remove FSharp.Compiler.Service.MSBuild.v12.dll // otherwise FCS thinks it should use msbuild, which leads to insanity - !! "packages/**/FSharp.Compiler.Service.MSBuild.*.dll" |> DeleteFiles + !! "packages/**/FSharp.Compiler.Service.MSBuild.*.dll" + |> DeleteFiles let args = - [ if not debug then - yield "--define:RELEASE" - if commands then - yield "--define:COMMANDS" - yield "--define:HELP" ] - + [ if not debug then yield "--define:RELEASE" + if commands then yield "--define:COMMANDS" + yield "--define:HELP"] let argLine = System.String.Join(" ", args) - execute - fail - (sprintf "Building documentation (%A), this could take some time, please wait..." commands) - "generating documentation failed" - (fakeStartInfo argLine "generate.fsx" "docs/tools" "" []) + fail + (sprintf "Building documentation (%A), this could take some time, please wait..." commands) + "generating documentation failed" + (fakeStartInfo argLine "generate.fsx" "docs/tools" "" []) CleanDir "docs/output/commands" -let generateHelp commands fail = generateHelp' commands fail false +let generateHelp commands fail = + generateHelp' commands fail false Target "GenerateHelp" (fun _ -> - if disableDocs then - () - else - DeleteFile "docs/content/release-notes.md" - CopyFile "docs/content/" "RELEASE_NOTES.md" - Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + if disableDocs then () else + DeleteFile "docs/content/release-notes.md" + CopyFile "docs/content/" "RELEASE_NOTES.md" + Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" - DeleteFile "docs/content/license.md" - CopyFile "docs/content/" "LICENSE.txt" - Rename "docs/content/license.md" "docs/content/LICENSE.txt" + DeleteFile "docs/content/license.md" + CopyFile "docs/content/" "LICENSE.txt" + Rename "docs/content/license.md" "docs/content/LICENSE.txt" - generateHelp true true) + generateHelp true true +) Target "GenerateHelpDebug" (fun _ -> - if disableDocs then - () - else - DeleteFile "docs/content/release-notes.md" - CopyFile "docs/content/" "RELEASE_NOTES.md" - Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + if disableDocs then () else + DeleteFile "docs/content/release-notes.md" + CopyFile "docs/content/" "RELEASE_NOTES.md" + Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" - DeleteFile "docs/content/license.md" - CopyFile "docs/content/" "LICENSE.txt" - Rename "docs/content/license.md" "docs/content/LICENSE.txt" + DeleteFile "docs/content/license.md" + CopyFile "docs/content/" "LICENSE.txt" + Rename "docs/content/license.md" "docs/content/LICENSE.txt" - generateHelp' true true true) + generateHelp' true true true +) Target "KeepRunning" (fun _ -> - use watcher = - !! "docs/content/**/*.*" - |> WatchChanges(fun changes -> generateHelp false false) + use watcher = !! "docs/content/**/*.*" |> WatchChanges (fun changes -> + generateHelp false false + ) traceImportant "Waiting for help edits. Press any key to stop." System.Console.ReadKey() |> ignore - watcher.Dispose()) + watcher.Dispose() +) Target "GenerateDocs" DoNothing @@ -630,29 +600,21 @@ Target "GenerateDocs" DoNothing // Release Scripts Target "ReleaseDocs" (fun _ -> - if disableDocs then - () - else - let tempDocsDir = "temp/gh-pages" - CleanDir tempDocsDir - Repository.cloneSingleBranch "" "git@github.com:fsprojects/Paket.git" "gh-pages" tempDocsDir - - Git.CommandHelper.runSimpleGitCommand tempDocsDir "rm . -f -r" |> ignore - CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A" + if disableDocs then () else + let tempDocsDir = "temp/gh-pages" + CleanDir tempDocsDir + Repository.cloneSingleBranch "" "git@github.com:fsprojects/Paket.git" "gh-pages" tempDocsDir - File.WriteAllText( - "temp/gh-pages/latest", - sprintf "https://github.com/fsprojects/Paket/releases/download/%s/paket.exe" release.NugetVersion - ) + Git.CommandHelper.runSimpleGitCommand tempDocsDir "rm . -f -r" |> ignore + CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A" - File.WriteAllText( - "temp/gh-pages/stable", - sprintf "https://github.com/fsprojects/Paket/releases/download/%s/paket.exe" stable.NugetVersion - ) + File.WriteAllText("temp/gh-pages/latest",sprintf "https://github.com/fsprojects/Paket/releases/download/%s/paket.exe" release.NugetVersion) + File.WriteAllText("temp/gh-pages/stable",sprintf "https://github.com/fsprojects/Paket/releases/download/%s/paket.exe" stable.NugetVersion) - StageAll tempDocsDir - Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) - Branches.push tempDocsDir) + StageAll tempDocsDir + Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) + Branches.push tempDocsDir +) #load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx" open Octokit @@ -663,29 +625,22 @@ Target "ReleaseGitHub" (fun _ -> | s when not (String.IsNullOrWhiteSpace s) -> s | _ -> eprintfn "Please update your release script to set 'github_user'!" - match getBuildParam "github-user" with | s when not (String.IsNullOrWhiteSpace s) -> s | _ -> getUserInput "Username: " - let pw = match getBuildParam "github_password" with | s when not (String.IsNullOrWhiteSpace s) -> s | _ -> eprintfn "Please update your release script to set 'github_password'!" - match getBuildParam "github_pw", getBuildParam "github-pw" with - | s, _ - | _, s when not (String.IsNullOrWhiteSpace s) -> s + | s, _ | _, s when not (String.IsNullOrWhiteSpace s) -> s | _ -> getUserPassword "Password: " - let remote = Git.CommandHelper.getGitResult "" "remote -v" |> Seq.filter (fun (s: string) -> s.EndsWith("(push)")) |> Seq.tryFind (fun (s: string) -> s.Contains(gitOwner + "/" + gitName)) - |> function - | None -> gitHome + "/" + gitName - | Some(s: string) -> s.Split().[0] + |> function None -> gitHome + "/" + gitName | Some (s: string) -> s.Split().[0] StageAll "" Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion) @@ -706,12 +661,10 @@ Target "ReleaseGitHub" (fun _ -> |> uploadFile ".paket/paket.targets" |> uploadFile ".paket/Paket.Restore.targets" |> uploadFile (tempDir sprintf "Paket.%s.nupkg" (release.NugetVersion)) - |> uploadFile ( - tempDir - sprintf "FSharp.DependencyManager.Paket.%s.nupkg" (release.NugetVersion) - ) + |> uploadFile (tempDir sprintf "FSharp.DependencyManager.Paket.%s.nupkg" (release.NugetVersion)) |> releaseDraft - |> Async.RunSynchronously) + |> Async.RunSynchronously +) Target "Release" DoNothing @@ -720,42 +673,59 @@ Target "BuildPackage" DoNothing // Run all targets by default. Invoke 'build ' to override let hasBuildParams buildParams = - buildParams |> List.map hasBuildParam |> List.exists id - -let unlessBuildParams buildParams = not (hasBuildParams buildParams) + buildParams + |> List.map hasBuildParam + |> List.exists id +let unlessBuildParams buildParams = + not (hasBuildParams buildParams) Target "All" DoNothing -"Clean" ==> "InstallDotNetCore" ==> "Restore" ==> "Build" ==> "Publish" -=?> ("RunTests", unlessBuildParams [ "SkipTests"; "SkipUnitTests" ]) -=?> ("GenerateReferenceDocs", isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) -=?> ("GenerateDocs", isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) -==> "All" -=?> ("ReleaseDocs", isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) - -"All" ==> "MergePaketTool" -=?> ("AddIconToExe", not isMono) -=?> ("RunIntegrationTestsNet", unlessBuildParams [ "SkipTests"; "SkipIntegrationTests"; "SkipIntegrationTestsNet" ]) -=?> ("RunIntegrationTestsNetCore", - unlessBuildParams [ "SkipTests"; "SkipIntegrationTests"; "SkipIntegrationTestsNetCore" ]) -==> "SignAssemblies" -==> "CalculateDownloadHash" -=?> ("NuGet", unlessBuildParams [ "SkipNuGet" ]) -==> "BuildPackage" - -"EnsurePackageSigned" ?=> "SignAssemblies" - - -"CleanDocs" ==> "GenerateHelp" ==> "GenerateReferenceDocs" ==> "GenerateDocs" - -"CleanDocs" ==> "GenerateHelpDebug" - -"GenerateHelp" ==> "KeepRunning" - -"BuildPackage" ==> "PublishNuGet" - -"ReleaseGitHub" ==> "ReleaseDocs" ==> "PublishNuGet" ==> "Release" - -"EnsurePackageSigned" ==> "Release" - -RunTargetOrDefault "All" +"Clean" + ==> "InstallDotNetCore" + ==> "Restore" + ==> "Build" + ==> "Publish" + =?> ("RunTests", unlessBuildParams [ "SkipTests"; "SkipUnitTests" ]) + =?> ("GenerateReferenceDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) + =?> ("GenerateDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) + ==> "All" + =?> ("ReleaseDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs")) + +"All" + ==> "MergePaketTool" + =?> ("AddIconToExe", not isMono) + =?> ("RunIntegrationTestsNet", unlessBuildParams [ "SkipTests"; "SkipIntegrationTests"; "SkipIntegrationTestsNet" ] ) + =?> ("RunIntegrationTestsNetCore", unlessBuildParams [ "SkipTests"; "SkipIntegrationTests"; "SkipIntegrationTestsNetCore" ] ) + ==> "SignAssemblies" + ==> "CalculateDownloadHash" + =?> ("NuGet", unlessBuildParams [ "SkipNuGet" ]) + ==> "BuildPackage" + +"EnsurePackageSigned" + ?=> "SignAssemblies" + + +"CleanDocs" + ==> "GenerateHelp" + ==> "GenerateReferenceDocs" + ==> "GenerateDocs" + +"CleanDocs" + ==> "GenerateHelpDebug" + +"GenerateHelp" + ==> "KeepRunning" + +"BuildPackage" + ==> "PublishNuGet" + +"ReleaseGitHub" + ==> "ReleaseDocs" + ==> "PublishNuGet" + ==> "Release" + +"EnsurePackageSigned" + ==> "Release" + +RunTargetOrDefault "All" \ No newline at end of file