From 3132cb1ba3393e6dfcec973649f019b45f73a6ef Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 15 Nov 2024 10:04:25 +0100 Subject: [PATCH] Revert "Bump version to 9.0.0-alpha001" This reverts commit 352dcc1734ebe46ba115c2a7a04fc921b465711c. # Conflicts: # .config/dotnet-tools.json # RELEASE_NOTES.md --- .config/dotnet-tools.json | 4 +- build.fsx | 71 ++++++++++++++++++- global.json | 2 +- .../Paket.Bootstrapper.csproj | 4 +- src/Paket/Paket.fsproj | 2 +- tests/Paket.Tests/Paket.Tests.fsproj | 2 +- 6 files changed, 75 insertions(+), 10 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index adb4bf47dd..9646a0fd20 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,11 +3,11 @@ "isRoot": true, "tools": { "paket": { - "version": "9.0.0-alpha001", + "version": "9.0.0", "commands": [ "paket" ], "rollForward": false } } -} \ No newline at end of file +} diff --git a/build.fsx b/build.fsx index 8606cbdee0..23a54ae928 100644 --- a/build.fsx +++ b/build.fsx @@ -43,6 +43,8 @@ let tags = "nuget, bundler, F#" 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" // Git configuration (used for publishing documentation in gh-pages branch) // The profile where the project is posted @@ -64,8 +66,10 @@ let mutable dotnetExePath = "dotnet" // -------------------------------------------------------------------------------------- let buildDir = "bin" +let buildDirNet461 = buildDir @@ "net461" let buildDirNet = buildDir @@ "net8" let buildDirBootstrapper = "bin_bootstrapper" +let buildDirBootstrapperNet461 = buildDirBootstrapper @@ "net461" let buildDirBootstrapperNet = buildDirBootstrapper @@ "net8" let tempDir = "temp" let buildMergedDir = buildDir @@ "merged" @@ -110,8 +114,11 @@ Target "InstallDotNetCore" (fun _ -> Target "Clean" (fun _ -> !! "src/**/bin" ++ "tests/**/bin" + ++ buildDir + ++ buildDirNet461 ++ buildDirNet ++ buildDirBootstrapper + ++ buildDirBootstrapperNet461 ++ buildDirBootstrapperNet ++ tempDir |> CleanDirs @@ -180,6 +187,15 @@ Target "Publish" (fun _ -> ] // 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 -> + { c with + Project = "src/Paket" + Framework = "net461" + Output = FullName (currentDirectory buildDirNet461) + ToolPath = dotnetExePath + AdditionalArgs = publishArgs + }) + DotNetCli.Publish (fun c -> { c with Project = "src/Paket" @@ -189,6 +205,15 @@ Target "Publish" (fun _ -> AdditionalArgs = publishArgs }) + DotNetCli.Publish (fun c -> + { c with + Project = "src/Paket.Bootstrapper" + Framework = "net461" + Output = FullName (currentDirectory buildDirBootstrapperNet461) + ToolPath = dotnetExePath + AdditionalArgs = publishArgs + }) + DotNetCli.Publish (fun c -> { c with Project = "src/Paket.Bootstrapper" @@ -222,8 +247,10 @@ Target "RunTests" (fun _ -> ToolPath = dotnetExePath }) + runTest "net" "Paket.Tests" "net461" runTest "netcore" "Paket.Tests" "net8" + runTest "net" "Paket.Bootstrapper.Tests" "net461" runTest "netcore" "Paket.Bootstrapper.Tests" "net8" ) @@ -256,9 +283,46 @@ Target "QuickIntegrationTests" (fun _ -> Target "MergePaketTool" (fun _ -> CreateDir buildMergedDir + let inBuildDirNet461 (file: string) = buildDirNet461 @@ file + + // syntax for ilrepack requires the 'primary' assembly to be the first positional argument, so we enforce that by not making + // paket.exe part of the ordered 'component' libraries + 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" + ] + |> List.map inBuildDirNet461 + |> separated " " - () // no more ILRepack + 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." ) "Publish" ==> "MergePaketTool" @@ -271,7 +335,7 @@ Target "RunIntegrationTestsNet" (fun _ -> DotNetCli.Test (fun c -> { c with Project = "integrationtests/Paket.IntegrationTests/Paket.IntegrationTests.fsproj" - Framework = "net8" + 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) ] @@ -406,7 +470,7 @@ Target "PublishNuGet" (fun _ -> // -------------------------------------------------------------------------------------- // Generate the documentation -let disableDocs = true // https://github.com/fsprojects/FSharp.Formatting/issues/461 +let disableDocs = false // https://github.com/fsprojects/FSharp.Formatting/issues/461 let fakePath = __SOURCE_DIRECTORY__ @@ "packages" @@ "build" @@ "FAKE" @@ "tools" @@ "FAKE.exe" let fakeStartInfo fsiargs script workingDirectory args environmentVars = @@ -593,6 +657,7 @@ Target "ReleaseGitHub" (fun _ -> |> uploadFile "./bin/merged/paket.exe" |> uploadFile "./bin/merged/paket-sha256.txt" |> uploadFile "./src/FSharp.DependencyManager.Paket/bin/Release/netstandard2.0/FSharp.DependencyManager.Paket.dll" + |> uploadFile "./bin_bootstrapper/net461/paket.bootstrapper.exe" |> uploadFile ".paket/paket.targets" |> uploadFile ".paket/Paket.Restore.targets" |> uploadFile (tempDir sprintf "Paket.%s.nupkg" (release.NugetVersion)) diff --git a/global.json b/global.json index 963afd1272..b2fcbafe0d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100", + "version": "8.0.403", "rollForward": "latestMinor" } } diff --git a/src/Paket.Bootstrapper/Paket.Bootstrapper.csproj b/src/Paket.Bootstrapper/Paket.Bootstrapper.csproj index a876700eab..0e3d277da0 100644 --- a/src/Paket.Bootstrapper/Paket.Bootstrapper.csproj +++ b/src/Paket.Bootstrapper/Paket.Bootstrapper.csproj @@ -2,7 +2,7 @@ Exe - net8 + net461;net8 Paket.Bootstrapper.Program paket.bootstrapper paketbootstrapper @@ -19,7 +19,7 @@ - + true tools true diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index 7c2d64d0fa..83a99aae43 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -2,7 +2,7 @@ Exe - net8 + net461;net8 Paket paket true diff --git a/tests/Paket.Tests/Paket.Tests.fsproj b/tests/Paket.Tests/Paket.Tests.fsproj index c64ed502d3..79e7d75c29 100644 --- a/tests/Paket.Tests/Paket.Tests.fsproj +++ b/tests/Paket.Tests/Paket.Tests.fsproj @@ -2,7 +2,7 @@ Library - net8 + net461;net8 true