diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 83c3421af3..7f35d2cb13 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -2,12 +2,6 @@ "version": 1, "isRoot": true, "tools": { - "sourcelink": { - "version": "3.1.1", - "commands": [ - "sourcelink" - ] - }, "dotnet-format": { "version": "5.1.250801", "commands": [ diff --git a/.github/workflows/netcore.yml b/.github/workflows/netcore.yml index 3eb5a4e2cf..8808440e6c 100644 --- a/.github/workflows/netcore.yml +++ b/.github/workflows/netcore.yml @@ -28,5 +28,5 @@ jobs: with: dotnet-version: 6.0.* - name: Build with dotnet - run: ./build.sh --linksources=true --verbosity=verbose + run: ./build.sh --verbosity=verbose shell: bash diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8741faedfd..be35bbd487 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: with: dotnet-version: 6.0.* - name: Build with dotnet - run: ./build.sh --linksources=true --verbosity=verbose + run: ./build.sh --verbosity=verbose shell: bash - name: Publish to NuGet diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 512fdc506b..55a7f2a190 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,11 +72,11 @@ To install dependencies and run the CAKE build script use the following wrapper - Windows (Powershell) -`.\build.ps1 -Target -Configuration Release -LinkSources [Additional Parameters]` +`.\build.ps1 -Target -Configuration Release [Additional Parameters]` - Linux/OSX (bash) -`./build.sh --target= --configuration==Release --linksources=true [Additional Parameters]` +`./build.sh --target= --configuration==Release [Additional Parameters]` ### Running Tests diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj index e8de439ecb..6182847ac8 100644 --- a/Octokit.Reactive/Octokit.Reactive.csproj +++ b/Octokit.Reactive/Octokit.Reactive.csproj @@ -22,6 +22,16 @@ $(NoWarn);1591;1701;1702;1705 + true + + + + + true + + true + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index a55742391c..a1f0c9075b 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -22,6 +22,16 @@ $(DefineConstants);SIMPLE_JSON_INTERNAL;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_READONLY_COLLECTIONS;SIMPLE_JSON_TYPEINFO $(NoWarn);1591;1701;1702;1705 + true + + + + + true + + true + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb diff --git a/README.md b/README.md index 405c62e69e..6a1e0ce6dc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Octokit - GitHub API Client Library for .NET ![Build status](https://github.com/octokit/octokit.net/workflows/CI%20Build/badge.svg) -[![Build status](https://ci.appveyor.com/api/projects/status/cego2g42yw26th26/branch/main?svg=true)](https://ci.appveyor.com/project/github-windows/octokit-net/branch/main) [![codecov](https://codecov.io/gh/octokit/octokit.net/branch/main/graph/badge.svg)](https://codecov.io/gh/octokit/octokit.net) [![Join the chat at https://gitter.im/octokit/octokit.net](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/octokit/octokit.net?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![NuGet](https://img.shields.io/nuget/v/Octokit.svg)](https://www.nuget.org/packages/Octokit) @@ -42,13 +41,6 @@ There is also an IObservable based GitHub API client library for .NET using Reac dotnet add package Octokit.Reactive ``` - -### Beta packages ### -Unstable NuGet packages that track the `main` branch of this repository are available at -[https://ci.appveyor.com/nuget/octokit-net](https://ci.appveyor.com/nuget/octokit-net) - -In Xamarin Studio you can find this option under the project's context menu: **Add | Add Packages...***. - ## Documentation Documentation is available at http://octokitnet.readthedocs.io/en/latest/. diff --git a/build.ps1 b/build.ps1 index c9d1cbf897..e98303f250 100644 --- a/build.ps1 +++ b/build.ps1 @@ -24,7 +24,6 @@ Param( [string]$Target = "Default", [ValidateSet("Release", "Debug")] [string]$Configuration = "Release", - [switch]$LinkSources, [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] [string]$Verbosity = "Normal", [switch]$WhatIf, @@ -98,7 +97,6 @@ if (!(Test-Path $NugetPath)) { $Arguments = @{ target=$Target; configuration=$Configuration; - linkSources=$LinkSources; verbosity=$Verbosity; dryrun=$WhatIf; }.GetEnumerator() | %{"--{0}=`"{1}`"" -f $_.key, $_.value }; diff --git a/build/Context.cs b/build/Context.cs index 95ab580761..6812eea00f 100644 --- a/build/Context.cs +++ b/build/Context.cs @@ -9,7 +9,6 @@ public class Context : FrostingContext { public string Target { get; set; } public new string Configuration { get; set; } - public bool LinkSources { get; set; } public bool FormatCode { get; set; } public BuildVersion Version { get; set; } @@ -17,11 +16,8 @@ public class Context : FrostingContext public bool IsLocalBuild { get; set; } public bool IsPullRequest { get; set; } public bool IsOriginalRepo { get; set; } - public bool IsTagged { get; set; } public bool IsMainBranch { get; set; } public bool ForcePublish { get; set; } - - public bool AppVeyor { get; set; } public bool GitHubActions { get; set; } public Project[] Projects { get; set; } diff --git a/build/Lifetime.cs b/build/Lifetime.cs index 310841b202..2a1191e481 100644 --- a/build/Lifetime.cs +++ b/build/Lifetime.cs @@ -12,7 +12,6 @@ public override void Setup(Context context) { context.Target = context.Argument("target", "Default"); context.Configuration = context.Argument("configuration", "Release"); - context.LinkSources = context.Argument("linkSources", false); context.FormatCode = context.Argument("formatCode", false); context.Artifacts = "./packaging/"; @@ -22,16 +21,8 @@ public override void Setup(Context context) context.IsLocalBuild = buildSystem.IsLocalBuild; context.GitHubActions = buildSystem.GitHubActions.IsRunningOnGitHubActions; - context.AppVeyor = buildSystem.AppVeyor.IsRunningOnAppVeyor; - context.IsTagged = IsBuildTagged(buildSystem); - if (context.AppVeyor) - { - context.IsPullRequest = buildSystem.AppVeyor.Environment.PullRequest.IsPullRequest; - context.IsOriginalRepo = StringComparer.OrdinalIgnoreCase.Equals("octokit/octokit.net", buildSystem.AppVeyor.Environment.Repository.Name); - context.IsMainBranch = StringComparer.OrdinalIgnoreCase.Equals("main", buildSystem.AppVeyor.Environment.Repository.Branch); - } - else if (context.GitHubActions) + if (context.GitHubActions) { context.IsPullRequest = buildSystem.GitHubActions.Environment.PullRequest.IsPullRequest; context.IsOriginalRepo = StringComparer.OrdinalIgnoreCase.Equals("octokit/octokit.net", buildSystem.GitHubActions.Environment.Workflow.Repository); @@ -62,18 +53,10 @@ public override void Setup(Context context) context.Information("Version: {0}", context.Version.Prefix); context.Information("Version suffix: {0}", context.Version.Suffix); context.Information("Configuration: {0}", context.Configuration); - context.Information("LinkSources: {0}", context.LinkSources); context.Information("Target: {0}", context.Target); - context.Information("AppVeyor: {0}", context.AppVeyor); context.Information("GitHub Actions: {0}", context.GitHubActions); } - private static bool IsBuildTagged(BuildSystem buildSystem) - { - return buildSystem.AppVeyor.Environment.Repository.Tag.IsTag - && !string.IsNullOrWhiteSpace(buildSystem.AppVeyor.Environment.Repository.Tag.Name); - } - private static string GetEnvironmentValueOrArgument(Context context, string environmentVariable, string argumentName) { var arg = context.EnvironmentVariable(environmentVariable); diff --git a/build/Tasks/Build.cs b/build/Tasks/Build.cs index 2e1af6c0ac..23c3e1c1f8 100644 --- a/build/Tasks/Build.cs +++ b/build/Tasks/Build.cs @@ -13,8 +13,7 @@ public override void Run(Context context) { Configuration = context.Configuration, ArgumentCustomization = args => args - .Append("/p:Version={0}", context.Version.GetSemanticVersion()) - .Append("/p:SourceLinkCreate={0}", context.LinkSources.ToString().ToLower()), + .Append("/p:Version={0}", context.Version.GetSemanticVersion()), }); } } diff --git a/build/Tasks/Default.cs b/build/Tasks/Default.cs index e69c10e224..e0bebc6861 100644 --- a/build/Tasks/Default.cs +++ b/build/Tasks/Default.cs @@ -1,6 +1,5 @@ using Cake.Frosting; - -[IsDependentOn(typeof(TestSourceLink))] +[IsDependentOn(typeof(Package))] public sealed class Default : FrostingTask { } diff --git a/build/Tasks/TestSourceLink.cs b/build/Tasks/TestSourceLink.cs deleted file mode 100644 index 003c617be5..0000000000 --- a/build/Tasks/TestSourceLink.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Cake.Common; -using Cake.Common.Diagnostics; -using Cake.Common.IO; -using Cake.Core; -using Cake.Core.IO; -using Cake.Frosting; - -[IsDependentOn(typeof(Package))] -public class TestSourceLink : FrostingTask -{ - public override void Run(Context context) - { - var nugetPackages = context.GetFiles($"./{context.Artifacts}/*.nupkg"); - - foreach (var nugetPackage in nugetPackages) - { - context.Information("Testing sourcelink info in {0}", context.Environment.WorkingDirectory.GetRelativePath(nugetPackage)); - var exitCode = context.StartProcess("dotnet", new ProcessSettings - { - WorkingDirectory = "Octokit", - Arguments = $"sourcelink test {nugetPackage.FullPath}" - }); - - if (exitCode != 0) - { - throw new Exception("Sourcelink test failed!"); - } - } - } - - public override bool ShouldRun(Context context) - { - return context.LinkSources; - } -} diff --git a/docs/debugging-source.md b/docs/debugging-source.md index c0b6b6418e..f0ecfacbce 100644 --- a/docs/debugging-source.md +++ b/docs/debugging-source.md @@ -22,11 +22,9 @@ with a specific type, and cache it in your local symbols cache. ![F11 step into symbol](https://cloud.githubusercontent.com/assets/359239/5389259/74600502-8149-11e4-94f7-10dc79a0573f.gif) -You can then set subsequent breakpoints inside the source code, to return to +You can then set subsequent breakpoints inside the source code, to return to in the debugging session. ### Acknowledgements -Thanks to [Cameron Taggart](http://blog.ctaggart.com/) for building the -[SourceLink](https://github.com/ctaggart/SourceLink) framework which we use -to support this behaviour. \ No newline at end of file +Thanks to Cameron Taggart for the initial implementation and the .NET foundation for ongoing support of [SourceLink](https://github.com/dotnet/sourcelink) which we use to provide source debugging. diff --git a/docs/shipping-releases.md b/docs/shipping-releases.md index 3d42c742c8..be46e8f41f 100644 --- a/docs/shipping-releases.md +++ b/docs/shipping-releases.md @@ -26,7 +26,7 @@ Or can be run individually: ### Create NuGet Packages -NuGet packages are automatically generated (and SourceLinked) by the CAKE build script. +NuGet packages are automatically generated (and SourceLinked) by the csproj configration. > `.\build.ps1` The output .nupkg files will be located in the `packaging` directory.