From 537a9c2e6698abdf1e985e1addb836790c74c94a Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 12 Nov 2025 14:47:15 +0100 Subject: [PATCH 1/7] Migrate to .NET 10 --- .github/workflows/ci.yml | 15 ++++------ build/scripts/scripts.fsproj | 2 +- global.json | 2 +- release-notes.sln | 39 -------------------------- release-notes.slnx | 15 ++++++++++ src/release-notes/Arguments.fs | 4 +-- src/release-notes/release-notes.fsproj | 2 +- 7 files changed, 25 insertions(+), 54 deletions(-) delete mode 100644 release-notes.sln create mode 100644 release-notes.slnx diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 860f70f..0218e88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,22 +18,17 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 with: fetch-depth: 1 - run: | git fetch --prune --unshallow --tags echo exit code $? git tag --list - - uses: actions/setup-dotnet@v1 + - uses: actions/setup-dotnet@v5 with: - dotnet-version: '3.1.404' - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '5.0.100' - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '6.0.302' + dotnet-version: | + 10.0.x source-url: https://nuget.pkg.github.com/nullean/index.json env: NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} @@ -51,7 +46,7 @@ jobs: if: github.event_name == 'push' && startswith(github.ref, 'refs/heads') shell: bash run: | - until dotnet nuget push build/output/*.nupkg -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate --no-symbols true; do echo "Retrying"; sleep 1; done; + until dotnet nuget push 'build/output/*.nupkg' -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate --no-symbols true; do echo "Retrying"; sleep 1; done; - run: ./build.sh generatereleasenotes -s true name: Generate release notes for tag diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index aa2301a..4c2351f 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net10.0 false diff --git a/global.json b/global.json index c317b00..fe7e453 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.302", + "version": "10.0.100", "rollForward": "latestFeature", "allowPrerelease": false } diff --git a/release-notes.sln b/release-notes.sln deleted file mode 100644 index 1cd93d5..0000000 --- a/release-notes.sln +++ /dev/null @@ -1,39 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "release-notes", "src\release-notes\release-notes.fsproj", "{AA3C8883-8C15-46C2-AF82-BEBF334F51A0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AA8D3BC4-CD54-4B7D-B8F2-2DEFE79DB49B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{31B8128C-F882-4799-A3B4-8D65A31F5CDC}" -ProjectSection(SolutionItems) = preProject - global.json = global.json - LICENSE = LICENSE - nuget-icon.png = nuget-icon.png - .editorconfig = .editorconfig - Directory.Build.props = Directory.Build.props - .github\workflows\ci.yml = .github\workflows\ci.yml - README.md = README.md -EndProjectSection -EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "scripts", "build\scripts\scripts.fsproj", "{42B72CA3-F9F6-44DA-8642-657D2A5E1A81}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AA3C8883-8C15-46C2-AF82-BEBF334F51A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AA3C8883-8C15-46C2-AF82-BEBF334F51A0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AA3C8883-8C15-46C2-AF82-BEBF334F51A0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AA3C8883-8C15-46C2-AF82-BEBF334F51A0}.Release|Any CPU.Build.0 = Release|Any CPU - {42B72CA3-F9F6-44DA-8642-657D2A5E1A81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {42B72CA3-F9F6-44DA-8642-657D2A5E1A81}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42B72CA3-F9F6-44DA-8642-657D2A5E1A81}.Release|Any CPU.ActiveCfg = Release|Any CPU - {42B72CA3-F9F6-44DA-8642-657D2A5E1A81}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {AA3C8883-8C15-46C2-AF82-BEBF334F51A0} = {AA8D3BC4-CD54-4B7D-B8F2-2DEFE79DB49B} - {42B72CA3-F9F6-44DA-8642-657D2A5E1A81} = {31B8128C-F882-4799-A3B4-8D65A31F5CDC} - EndGlobalSection -EndGlobal diff --git a/release-notes.slnx b/release-notes.slnx new file mode 100644 index 0000000..bafb048 --- /dev/null +++ b/release-notes.slnx @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/release-notes/Arguments.fs b/src/release-notes/Arguments.fs index 06a94ce..e56e07d 100644 --- a/src/release-notes/Arguments.fs +++ b/src/release-notes/Arguments.fs @@ -44,8 +44,8 @@ type Arguments = | Version _ -> "Version that is being released" | Token _ -> "The github token to use, if the issue list is long this may be necessary, defaults to anonymous" - | ApplyLabels _ -> "Creates version and backport labels" - | FindPreviousVersion _ -> "Find the previous release for the passed version" + | ApplyLabels -> "Creates version and backport labels" + | FindPreviousVersion -> "Find the previous release for the passed version" | CurrentVersion _ -> "Given search syntax finds the current and the next versions on separate lines" | CreateRelease _ -> "Makes sure the tag exists as release on github and introduces new version labels for the next major/minor/patch" diff --git a/src/release-notes/release-notes.fsproj b/src/release-notes/release-notes.fsproj index 0550bbb..fc87e1d 100644 --- a/src/release-notes/release-notes.fsproj +++ b/src/release-notes/release-notes.fsproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0;netcoreapp3.1;net5.0;net6.0 + net8.0;net10.0 release-notes ReleaseNotes true From 7e559dd6296eed4eeae1bd6569a6632e2864cddc Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 12 Nov 2025 14:50:40 +0100 Subject: [PATCH 2/7] update scripts --- build/scripts/Paths.fs | 2 +- build/scripts/Targets.fs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/scripts/Paths.fs b/build/scripts/Paths.fs index 38c8235..9c7b95e 100644 --- a/build/scripts/Paths.fs +++ b/build/scripts/Paths.fs @@ -8,7 +8,7 @@ let Repository = sprintf "nullean/%s" ToolName let Root = let mutable dir = DirectoryInfo(".") - while dir.GetFiles("*.sln").Length = 0 do dir <- dir.Parent + while dir.GetFiles("*.slnx").Length = 0 do dir <- dir.Parent Environment.CurrentDirectory <- dir.FullName dir diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index 4d83723..d8b8bf3 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -61,7 +61,7 @@ let private generateReleaseNotes (arguments:ParseResults) = let currentVersion = currentVersion.Value let output = Paths.RootRelative <| Path.Combine(Paths.Output.FullName, sprintf "release-notes-%s.md" currentVersion) - let dotnetRun =[ "run"; "-c"; "Release"; "-f"; "net5.0"; "-p"; project] + let dotnetRun =[ "run"; "-c"; "Release"; "-f"; "net10.0"; "-p"; project] let tokenArgs = match arguments.TryGetResult Token with | None -> [] @@ -80,7 +80,7 @@ let private generateReleaseNotes (arguments:ParseResults) = let private createReleaseOnGithub (arguments:ParseResults) = let project = Paths.RootRelative Paths.ToolProject.FullName let currentVersion = currentVersion.Value - let dotnetRun =[ "run"; "-c"; "Release"; "-f"; "net5.0"; "-p"; project] + let dotnetRun =[ "run"; "-c"; "Release"; "-f"; "net10.0"; "-p"; project] let tokenArgs = match arguments.TryGetResult Token with | None -> [] From d4078b6ac4fd6f5be08cb0192e1254dbb164b509 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 12 Nov 2025 14:57:53 +0100 Subject: [PATCH 3/7] update scripts --- Directory.Build.props | 3 ++- build/scripts/Targets.fs | 2 +- dotnet-tools.json | 15 +++++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index e47a21b..4a623e7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,8 @@  - canary + canary.0 + 0.1 diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index d8b8bf3..a894538 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -17,7 +17,7 @@ let private restoreTools = lazy(exec "dotnet" ["tool"; "restore"]) let private currentVersion = lazy( restoreTools.Value |> ignore - let r = Proc.Start("dotnet", "minver", "-d=canary") + let r = Proc.Start("dotnet", "minver", "-p=canary.0", "-v=e", "-m=0.1") let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith("MinVer:"))) o.Line ) diff --git a/dotnet-tools.json b/dotnet-tools.json index d95f7ca..7020aea 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -3,22 +3,25 @@ "isRoot": true, "tools": { "minver-cli": { - "version": "2.3.1", + "version": "6.0.0", "commands": [ "minver" - ] + ], + "rollForward": false }, "nupkg-validator": { - "version": "0.5.0", + "version": "0.10.0", "commands": [ "nupkg-validator" - ] + ], + "rollForward": false }, "assembly-differ": { - "version": "0.11.1", + "version": "0.16.0", "commands": [ "assembly-differ" - ] + ], + "rollForward": false } } } \ No newline at end of file From 16d80d4d6b449026ee4090717b7b05e49aa508c9 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 12 Nov 2025 15:01:17 +0100 Subject: [PATCH 4/7] update scripts --- build/scripts/Targets.fs | 3 +-- build/scripts/scripts.fsproj | 3 ++- src/release-notes/release-notes.fsproj | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index a894538..ce7c846 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -10,8 +10,7 @@ open ProcNet let exec binary args = - let r = Proc.Exec (binary, args |> List.map (fun a -> sprintf "\"%s\"" a) |> List.toArray) - match r.HasValue with | true -> r.Value | false -> failwithf "invocation of `%s` timed out" binary + Proc.Exec (binary, args |> List.toArray) let private restoreTools = lazy(exec "dotnet" ["tool"; "restore"]) let private currentVersion = diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index 4c2351f..e396a5e 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -8,8 +8,9 @@ - + + diff --git a/src/release-notes/release-notes.fsproj b/src/release-notes/release-notes.fsproj index fc87e1d..21afc71 100644 --- a/src/release-notes/release-notes.fsproj +++ b/src/release-notes/release-notes.fsproj @@ -43,6 +43,7 @@ + From e17feebf64e9a7a9da8880f44e20f9d9bd05531c Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 12 Nov 2025 15:58:22 +0100 Subject: [PATCH 5/7] update minver and bullseye --- Directory.Build.props | 2 +- build/scripts/Program.fs | 5 +++-- build/scripts/Targets.fs | 4 +++- build/scripts/scripts.fsproj | 3 +-- src/release-notes/release-notes.fsproj | 1 - 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 4a623e7..d05fa3e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,7 +5,7 @@ 0.1 - + all diff --git a/build/scripts/Program.fs b/build/scripts/Program.fs index c346f06..88ff9c9 100644 --- a/build/scripts/Program.fs +++ b/build/scripts/Program.fs @@ -26,7 +26,8 @@ let main argv = Targets.Setup parsed arguments let swallowTypes = [typeof; typeof] - Targets.RunTargetsAndExit - ([target], (fun e -> swallowTypes |> List.contains (e.GetType()) ), ":") + task { + return! Targets.RunTargetsAndExitAsync([ target ], (fun e -> swallowTypes |> List.contains (e.GetType())), (fun _ -> ":"), null, null) + } |> Async.AwaitTask |> Async.RunSynchronously 0 diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index ce7c846..6a3374f 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -20,6 +20,8 @@ let private currentVersion = let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith("MinVer:"))) o.Line ) +let private currentVersionInformational = + lazy (sprintf "%s+%s" currentVersion.Value (Information.getCurrentSHA1 ".")) let private clean (arguments:ParseResults) = if (Paths.Output.Exists) then Paths.Output.Delete (true) @@ -40,7 +42,7 @@ let private validatePackages (arguments:ParseResults) = let nugetPackage = let p = Paths.Output.GetFiles("*.nupkg") |> Seq.sortByDescending(fun f -> f.CreationTimeUtc) |> Seq.head Paths.RootRelative p.FullName - exec "dotnet" ["nupkg-validator"; nugetPackage; "-v"; currentVersion.Value; "-a"; Paths.ToolName; "-k"; "96c599bbe3e70f5d"] |> ignore + exec "dotnet" ["nupkg-validator"; nugetPackage; "-v"; currentVersionInformational.Value; "-a"; Paths.ToolName; "-k"; "96c599bbe3e70f5d"] |> ignore let private generateApiChanges (arguments:ParseResults) = let output = Paths.RootRelative <| Paths.Output.FullName diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index e396a5e..4136066 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -7,10 +7,9 @@ - + - diff --git a/src/release-notes/release-notes.fsproj b/src/release-notes/release-notes.fsproj index 21afc71..fc87e1d 100644 --- a/src/release-notes/release-notes.fsproj +++ b/src/release-notes/release-notes.fsproj @@ -43,7 +43,6 @@ - From 53a18b1ec0ed9955f4bf02b61eb4ba5f5e17d673 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 12 Nov 2025 16:28:16 +0100 Subject: [PATCH 6/7] update generateapichanges --- build/scripts/Targets.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index 6a3374f..83744d0 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -50,8 +50,8 @@ let private generateApiChanges (arguments:ParseResults) = let args = [ "assembly-differ" - (sprintf "previous-nuget|%s|%s|netcoreapp3.1" Paths.ToolName currentVersion); - (sprintf "directory|src/%s/bin/Release/netcoreapp3.1" Paths.ToolName); + (sprintf "previous-nuget|%s|%s|net10.0" Paths.ToolName currentVersion); + (sprintf "directory|src/%s/bin/Release/net10.0" Paths.ToolName); "--target"; "release-notes"; "-f"; "github-comment"; "--output"; output ] From 6ed51ecb67e7128cd8259df641a1b192645fb166 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 12 Nov 2025 16:31:42 +0100 Subject: [PATCH 7/7] fix build warnings --- build/scripts/CommandLine.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/scripts/CommandLine.fs b/build/scripts/CommandLine.fs index 2453673..a9672ac 100644 --- a/build/scripts/CommandLine.fs +++ b/build/scripts/CommandLine.fs @@ -23,10 +23,10 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Clean _ -> "clean known output locations" - | Build _ -> "Run build and tests" - | Release _ -> "runs build, and create an validates the packages shy of publishing them" - | Publish _ -> "Runs the full release" + | Clean -> "clean known output locations" + | Build -> "Run build and tests" + | Release -> "runs build, and create an validates the packages shy of publishing them" + | Publish -> "Runs the full release" | SingleTarget _ -> "Runs the provided sub command without running their dependencies" | Token _ -> "Token to be used to authenticate with github"