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/Directory.Build.props b/Directory.Build.props index e47a21b..d05fa3e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,10 +1,11 @@  - canary + canary.0 + 0.1 - + all 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" 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/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 4d83723..83744d0 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -10,17 +10,18 @@ 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 = 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 ) +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) @@ -41,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 @@ -49,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 ] @@ -61,7 +62,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 +81,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 -> [] diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index aa2301a..4136066 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -2,13 +2,13 @@ Exe - netcoreapp3.1 + net10.0 false - - + + 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 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