From c0111d6505385350889336b755aa0de738e8363c Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 9 Feb 2020 11:55:12 -0400 Subject: [PATCH 1/7] add workaround for msbuild changes as part of .net core 3.1 --- Directory.Build.targets | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Directory.Build.targets diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000000..f42ed479c9 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,9 @@ + + + true + $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)')) + + + + + From d7f19ce145ee0c0bf8597fded5916470c35052d2 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 9 Feb 2020 11:56:00 -0400 Subject: [PATCH 2/7] bump Actions jobs to run on netcoreapp3.1 --- .github/workflows/netcore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/netcore.yml b/.github/workflows/netcore.yml index e547219f15..87366f2a1a 100644 --- a/.github/workflows/netcore.yml +++ b/.github/workflows/netcore.yml @@ -22,7 +22,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1.4.0 with: - dotnet-version: 2.1.803 + dotnet-version: 3.1.101 - name: Build with dotnet run: ./build.sh --linksources=true --verbosity=verbose shell: bash From e7cee7ec0b5a560d02c57117455fec27b7c126a7 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 9 Feb 2020 11:56:28 -0400 Subject: [PATCH 3/7] bump Appveyor to version that contains netcoreapp3.1 --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index be9bafff9e..4235f56e5e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -image: Visual Studio 2017 +image: Visual Studio 2019 branches: only: @@ -16,4 +16,4 @@ test: off artifacts: - path: 'packaging\octokit*.nupkg' - name: OctokitPackages \ No newline at end of file + name: OctokitPackages From bdaea767d90dee38d9a74175b71e61cf1ce03417 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 9 Feb 2020 11:58:43 -0400 Subject: [PATCH 4/7] find and rename all netcoreapp2.* mentions --- Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj | 2 +- Octokit.Tests.Integration/Octokit.Tests.Integration.csproj | 6 +++--- Octokit.Tests/Octokit.Tests.csproj | 4 ++-- build/.vscode/launch.json | 4 ++-- build/Build.csproj | 2 +- build/Context.cs | 2 +- build/Tasks/CodeCoverage.cs | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj b/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj index 629a9c39f2..7f870ff27a 100644 --- a/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj +++ b/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj @@ -4,7 +4,7 @@ Convention-based tests for Octokit Octokit.Tests.Conventions GitHub - netcoreapp2.1;net452 + netcoreapp3.1;net452 $(NoWarn);CS4014;CS1998 Octokit.Tests.Conventions Octokit.Tests.Conventions diff --git a/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj b/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj index 7e6c0b750e..29e43af0e7 100644 --- a/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj +++ b/Octokit.Tests.Integration/Octokit.Tests.Integration.csproj @@ -4,7 +4,7 @@ Integration tests for Octokit Octokit.Tests.Integration GitHub - netcoreapp2.1;net452 + netcoreapp3.1;net452 $(NoWarn);CS4014;CS1998 Octokit.Tests.Integration Octokit.Tests.Integration @@ -19,7 +19,7 @@ false - + $(DefineConstants);GITHUBJWT_HELPER_AVAILABLE @@ -45,7 +45,7 @@ - + diff --git a/Octokit.Tests/Octokit.Tests.csproj b/Octokit.Tests/Octokit.Tests.csproj index e59d0f2e50..f5dcb2c732 100644 --- a/Octokit.Tests/Octokit.Tests.csproj +++ b/Octokit.Tests/Octokit.Tests.csproj @@ -4,7 +4,7 @@ Tests for Octokit Octokit.Tests GitHub - netcoreapp2.1;net452 + netcoreapp3.1;net452 $(NoWarn);CS4014;CS1998 Octokit.Tests Octokit.Tests @@ -32,7 +32,7 @@ - + $(DefineConstants);NO_SERIALIZABLE;HAS_TYPEINFO diff --git a/build/.vscode/launch.json b/build/.vscode/launch.json index b097db5239..1c67c5f4c1 100644 --- a/build/.vscode/launch.json +++ b/build/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/Build.dll", + "program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/Build.dll", "args": [], "cwd": "${workspaceFolder}", // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window @@ -25,4 +25,4 @@ "processId": "${command:pickProcess}" } ,] -} \ No newline at end of file +} diff --git a/build/Build.csproj b/build/Build.csproj index 0a9bb56631..02360e683f 100644 --- a/build/Build.csproj +++ b/build/Build.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.0 + netcoreapp3.1 diff --git a/build/Context.cs b/build/Context.cs index c6111a0850..dc5685f624 100644 --- a/build/Context.cs +++ b/build/Context.cs @@ -41,7 +41,7 @@ public DotNetCoreTestSettings GetTestSettings() if (!this.IsRunningOnWindows()) { - var testFramework = "netcoreapp2.1"; + var testFramework = "netcoreapp3.1"; this.Information($"Running tests against {testFramework} only as we're not on Windows."); settings.Framework = testFramework; diff --git a/build/Tasks/CodeCoverage.cs b/build/Tasks/CodeCoverage.cs index 1d9f0b81b8..e972a12116 100644 --- a/build/Tasks/CodeCoverage.cs +++ b/build/Tasks/CodeCoverage.cs @@ -21,13 +21,13 @@ public override void Run(Context context) context.Information("Executing Code Coverage for Project {0}...", project.Name); var dotNetCoreCoverage = context.CodeCoverage - .CombineWithFilePath(project.Name + "-netcoreapp2.1.xml"); + .CombineWithFilePath(project.Name + "-netcoreapp3.1.xml"); coverageFiles.Add(dotNetCoreCoverage); context.Coverlet(project, new CoverletToolSettings() { Configuration = context.Configuration, - Framework = "netcoreapp2.1", + Framework = "netcoreapp3.1", Output = dotNetCoreCoverage.FullPath }); From 7695a1cd3d48c4490ab874faf0b9db42a45e6dab Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 9 Feb 2020 12:00:25 -0400 Subject: [PATCH 5/7] add global.json to ensure we're using the same SDK version everywhere --- global.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 global.json diff --git a/global.json b/global.json new file mode 100644 index 0000000000..c685cffc7a --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "3.1.101" + } +} From 44cdcb1420596bc4a3c83665558ea1e78d39697e Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 9 Feb 2020 12:04:29 -0400 Subject: [PATCH 6/7] move sourcelink into new global tool setup --- .config/dotnet-tools.json | 12 ++++++++++++ Octokit/Octokit.csproj | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .config/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000000..5e9a36e70e --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "sourcelink": { + "version": "3.1.1", + "commands": [ + "sourcelink" + ] + } + } +} \ No newline at end of file diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 004eacccdd..1d63045313 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -53,8 +53,6 @@ - - From 75cb523e7db2908fdb13eab469701aca6d5860b7 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 9 Feb 2020 12:11:02 -0400 Subject: [PATCH 7/7] restoring global tools as part of build --- build.ps1 | 7 +++++++ build.sh | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 9826e3b2f6..c9d1cbf897 100644 --- a/build.ps1 +++ b/build.ps1 @@ -103,6 +103,13 @@ $Arguments = @{ dryrun=$WhatIf; }.GetEnumerator() | %{"--{0}=`"{1}`"" -f $_.key, $_.value }; +Write-Host "Restoring global tools..." +Invoke-Expression "dotnet tool restore" +if($LASTEXITCODE -ne 0) { + Pop-Location; + exit $LASTEXITCODE; +} + # Start Cake Push-Location Set-Location build diff --git a/build.sh b/build.sh index db1aeb14a7..4393a1eed8 100755 --- a/build.sh +++ b/build.sh @@ -6,10 +6,13 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then echo "new limit: `ulimit -n`" fi +echo "Restoring global tools" +dotnet tool restore + cd build echo "Preparing Cake.Frosting build runner..." dotnet restore echo "Executing Cake.Frosting build runner..." echo "dotnet run -- $@" -dotnet run -- "$@" \ No newline at end of file +dotnet run -- "$@"