From 896ce57059fcde45090f60ff535afafa9da88011 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Wed, 26 Feb 2025 08:57:33 +0000 Subject: [PATCH 1/4] Update to add net9.0 target and use .NET 9 SDK --- .github/workflows/ci.yml | 1 + build/scripts/Targets.fs | 1 - build/scripts/scripts.fsproj | 6 +++--- global.json | 2 +- src/assembly-differ/assembly-differ.csproj | 16 ++++++++-------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c6f8cd..d3f42c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,7 @@ jobs: - uses: actions/setup-dotnet@v1 with: dotnet-version: | + 9.0.x 8.0.x 6.0.x - uses: actions/setup-dotnet@v1 diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index 8fbc3be..c53ef72 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -8,7 +8,6 @@ open CommandLine open Fake.Tools.Git 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 diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index d53da47..a667b4d 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -2,14 +2,14 @@ Exe - net6.0 + net9.0 false - + - + diff --git a/global.json b/global.json index 4c4c3ae..41c9ad2 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "9.0.100", "rollForward": "latestFeature", "allowPrerelease": false } diff --git a/src/assembly-differ/assembly-differ.csproj b/src/assembly-differ/assembly-differ.csproj index e98c1cc..8980d5f 100644 --- a/src/assembly-differ/assembly-differ.csproj +++ b/src/assembly-differ/assembly-differ.csproj @@ -1,7 +1,7 @@  Exe - net6.0;net8.0 + net6.0;net8.0;net9.0 assembly-differ AssemblyDiffer true @@ -30,16 +30,16 @@ + - - - - - - - + + + + + + From 6e8db8b6db8dd9e85024209c69a1aa9a173833c4 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Wed, 26 Feb 2025 10:15:33 +0000 Subject: [PATCH 2/4] Temporarily disable validate packages --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3f42c2..c788f07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,8 +42,8 @@ jobs: name: Build - run: ./build.sh generatepackages -s true name: Generate local nuget packages - - run: ./build.sh validatepackages -s true - name: "validate *.npkg files that were created" + # - run: ./build.sh validatepackages -s true + # name: "validate *.npkg files that were created" - run: ./build.sh generateapichanges -s true name: "Inspect public API changes" From 6c8631c482527e47ae2f45e5b40d9a9794058fad Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Wed, 26 Feb 2025 12:21:29 +0000 Subject: [PATCH 3/4] Update to use roll forward --- .github/workflows/ci.yml | 4 ++-- build/scripts/Targets.fs | 12 ++++++------ src/assembly-differ/assembly-differ.csproj | 6 ++---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c788f07..50c59a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,9 +42,9 @@ jobs: name: Build - run: ./build.sh generatepackages -s true name: Generate local nuget packages - # - run: ./build.sh validatepackages -s true + - run: ./build.sh validatepackages -s true # name: "validate *.npkg files that were created" - - run: ./build.sh generateapichanges -s true + # - run: ./build.sh generateapichanges -s true name: "Inspect public API changes" - name: publish to github package repository diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index c53ef72..a1a8e1e 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -17,7 +17,7 @@ let private currentVersion = lazy( restoreTools.Value |> ignore let r = Proc.Start("dotnet", "minver", "-p", "canary.0") - let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith("MinVer:"))) + let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith "MinVer:")) o.Line ) @@ -45,19 +45,19 @@ let private generatePackages (arguments:ParseResults) = let private validatePackages (arguments:ParseResults) = let nugetPackage = - let p = Paths.Output.GetFiles("*.nupkg") |> Seq.sortByDescending(fun f -> f.CreationTimeUtc) |> Seq.head + let p = Paths.Output.GetFiles "*.nupkg" |> Seq.sortByDescending(fun f -> f.CreationTimeUtc) |> Seq.head Paths.RootRelative p.FullName - exec "dotnet" ["nupkg-validator"; nugetPackage; "-v"; currentVersionInformational.Value; "-a"; Paths.ToolName; "-k"; "96c599bbe3e70f5d"] |> ignore + exec "dotnet" ["nupkg-validator"; nugetPackage; "-v"; currentVersionInformational.Value; "-a"; Paths.ToolName; "-k"; "96c599bbe3e70f5d"; "--allow-roll-forward"] |> ignore let private generateApiChanges (arguments:ParseResults) = let output = Paths.RootRelative <| Paths.Output.FullName let currentVersion = currentVersion.Value let project = Paths.RootRelative Paths.ToolProject.FullName - let dotnetRun =[ "run"; "-c"; "Release"; "-f"; "net6.0"; "--project"; project] + let dotnetRun =[ "run"; "-c"; "Release"; "-f"; "net9.0"; "--project"; project] let args = [ - (sprintf "previous-nuget|%s|%s|netcoreapp3.1" Paths.ToolName currentVersion); - (sprintf "directory|src/%s/bin/Release/net6.0" Paths.ToolName); + sprintf "previous-nuget|%s|%s|net8.0" Paths.ToolName currentVersion; + sprintf "directory|src/%s/bin/Release/net9.0" Paths.ToolName; "--target"; Paths.ToolName; "-f"; "github-comment"; "--output"; output ] diff --git a/src/assembly-differ/assembly-differ.csproj b/src/assembly-differ/assembly-differ.csproj index 8980d5f..9101892 100644 --- a/src/assembly-differ/assembly-differ.csproj +++ b/src/assembly-differ/assembly-differ.csproj @@ -6,19 +6,16 @@ AssemblyDiffer true assembly-differ - + Major true ..\..\build\keys\keypair.snk - nuget-icon.png MIT https://github.com/nullean/assembly-differ https://github.com/nullean/assembly-differ https://github.com/nullean/assembly-differ/releases - assembly-differ: a dotnet tool to diff assemblies Diff assemblies and nuget packages - @@ -42,6 +39,7 @@ + lib\JustAssembly.API.dll From 08c2df559b2d8611d8a954a48596be9cd4844e8b Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Wed, 26 Feb 2025 12:26:49 +0000 Subject: [PATCH 4/4] Tweak workflow (test) --- .github/workflows/ci.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50c59a3..0356c74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,15 +29,7 @@ jobs: with: dotnet-version: | 9.0.x - 8.0.x - 6.0.x - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '6.0.100' - source-url: https://nuget.pkg.github.com/nullean/index.json - env: - NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - + - run: ./build.sh build -s true name: Build - run: ./build.sh generatepackages -s true