mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
upgrade project tooling to .NET Core 3.1 (#2089)
This commit is contained in:
12
.config/dotnet-tools.json
Normal file
12
.config/dotnet-tools.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"isRoot": true,
|
||||||
|
"tools": {
|
||||||
|
"sourcelink": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"commands": [
|
||||||
|
"sourcelink"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
2
.github/workflows/netcore.yml
vendored
2
.github/workflows/netcore.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Setup .NET Core
|
- name: Setup .NET Core
|
||||||
uses: actions/setup-dotnet@v1.4.0
|
uses: actions/setup-dotnet@v1.4.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: 2.1.803
|
dotnet-version: 3.1.101
|
||||||
- name: Build with dotnet
|
- name: Build with dotnet
|
||||||
run: ./build.sh --linksources=true --verbosity=verbose
|
run: ./build.sh --linksources=true --verbosity=verbose
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
9
Directory.Build.targets
Normal file
9
Directory.Build.targets
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||||
|
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<Description>Convention-based tests for Octokit</Description>
|
<Description>Convention-based tests for Octokit</Description>
|
||||||
<AssemblyTitle>Octokit.Tests.Conventions</AssemblyTitle>
|
<AssemblyTitle>Octokit.Tests.Conventions</AssemblyTitle>
|
||||||
<Authors>GitHub</Authors>
|
<Authors>GitHub</Authors>
|
||||||
<TargetFrameworks>netcoreapp2.1;net452</TargetFrameworks>
|
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
|
||||||
<NoWarn>$(NoWarn);CS4014;CS1998</NoWarn>
|
<NoWarn>$(NoWarn);CS4014;CS1998</NoWarn>
|
||||||
<AssemblyName>Octokit.Tests.Conventions</AssemblyName>
|
<AssemblyName>Octokit.Tests.Conventions</AssemblyName>
|
||||||
<PackageId>Octokit.Tests.Conventions</PackageId>
|
<PackageId>Octokit.Tests.Conventions</PackageId>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<Description>Integration tests for Octokit</Description>
|
<Description>Integration tests for Octokit</Description>
|
||||||
<AssemblyTitle>Octokit.Tests.Integration</AssemblyTitle>
|
<AssemblyTitle>Octokit.Tests.Integration</AssemblyTitle>
|
||||||
<Authors>GitHub</Authors>
|
<Authors>GitHub</Authors>
|
||||||
<TargetFrameworks>netcoreapp2.1;net452</TargetFrameworks>
|
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
|
||||||
<NoWarn>$(NoWarn);CS4014;CS1998</NoWarn>
|
<NoWarn>$(NoWarn);CS4014;CS1998</NoWarn>
|
||||||
<AssemblyName>Octokit.Tests.Integration</AssemblyName>
|
<AssemblyName>Octokit.Tests.Integration</AssemblyName>
|
||||||
<PackageId>Octokit.Tests.Integration</PackageId>
|
<PackageId>Octokit.Tests.Integration</PackageId>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
|
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
|
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||||
<DefineConstants>$(DefineConstants);GITHUBJWT_HELPER_AVAILABLE</DefineConstants>
|
<DefineConstants>$(DefineConstants);GITHUBJWT_HELPER_AVAILABLE</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
||||||
<PackageReference Include="GitHubJwt" Version="0.0.4" />
|
<PackageReference Include="GitHubJwt" Version="0.0.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<Description>Tests for Octokit</Description>
|
<Description>Tests for Octokit</Description>
|
||||||
<AssemblyTitle>Octokit.Tests</AssemblyTitle>
|
<AssemblyTitle>Octokit.Tests</AssemblyTitle>
|
||||||
<Authors>GitHub</Authors>
|
<Authors>GitHub</Authors>
|
||||||
<TargetFrameworks>netcoreapp2.1;net452</TargetFrameworks>
|
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
|
||||||
<NoWarn>$(NoWarn);CS4014;CS1998</NoWarn>
|
<NoWarn>$(NoWarn);CS4014;CS1998</NoWarn>
|
||||||
<AssemblyName>Octokit.Tests</AssemblyName>
|
<AssemblyName>Octokit.Tests</AssemblyName>
|
||||||
<PackageId>Octokit.Tests</PackageId>
|
<PackageId>Octokit.Tests</PackageId>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<PackageReference Include="NSubstitute" Version="4.2.1" />
|
<PackageReference Include="NSubstitute" Version="4.2.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
|
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||||
<DefineConstants>$(DefineConstants);NO_SERIALIZABLE;HAS_TYPEINFO</DefineConstants>
|
<DefineConstants>$(DefineConstants);NO_SERIALIZABLE;HAS_TYPEINFO</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
|
||||||
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.8.3" />
|
|
||||||
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.8.3" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
image: Visual Studio 2017
|
image: Visual Studio 2019
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
|||||||
@@ -103,6 +103,13 @@ $Arguments = @{
|
|||||||
dryrun=$WhatIf;
|
dryrun=$WhatIf;
|
||||||
}.GetEnumerator() | %{"--{0}=`"{1}`"" -f $_.key, $_.value };
|
}.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
|
# Start Cake
|
||||||
Push-Location
|
Push-Location
|
||||||
Set-Location build
|
Set-Location build
|
||||||
|
|||||||
3
build.sh
3
build.sh
@@ -6,6 +6,9 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|||||||
echo "new limit: `ulimit -n`"
|
echo "new limit: `ulimit -n`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Restoring global tools"
|
||||||
|
dotnet tool restore
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
echo "Preparing Cake.Frosting build runner..."
|
echo "Preparing Cake.Frosting build runner..."
|
||||||
dotnet restore
|
dotnet restore
|
||||||
|
|||||||
2
build/.vscode/launch.json
vendored
2
build/.vscode/launch.json
vendored
@@ -10,7 +10,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "build",
|
||||||
// If you have changed target frameworks, make sure to update the program path.
|
// 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": [],
|
"args": [],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
|
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class Context : FrostingContext
|
|||||||
|
|
||||||
if (!this.IsRunningOnWindows())
|
if (!this.IsRunningOnWindows())
|
||||||
{
|
{
|
||||||
var testFramework = "netcoreapp2.1";
|
var testFramework = "netcoreapp3.1";
|
||||||
|
|
||||||
this.Information($"Running tests against {testFramework} only as we're not on Windows.");
|
this.Information($"Running tests against {testFramework} only as we're not on Windows.");
|
||||||
settings.Framework = testFramework;
|
settings.Framework = testFramework;
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ public sealed class CodeCoverage : FrostingTask<Context>
|
|||||||
context.Information("Executing Code Coverage for Project {0}...", project.Name);
|
context.Information("Executing Code Coverage for Project {0}...", project.Name);
|
||||||
|
|
||||||
var dotNetCoreCoverage = context.CodeCoverage
|
var dotNetCoreCoverage = context.CodeCoverage
|
||||||
.CombineWithFilePath(project.Name + "-netcoreapp2.1.xml");
|
.CombineWithFilePath(project.Name + "-netcoreapp3.1.xml");
|
||||||
coverageFiles.Add(dotNetCoreCoverage);
|
coverageFiles.Add(dotNetCoreCoverage);
|
||||||
|
|
||||||
context.Coverlet(project, new CoverletToolSettings()
|
context.Coverlet(project, new CoverletToolSettings()
|
||||||
{
|
{
|
||||||
Configuration = context.Configuration,
|
Configuration = context.Configuration,
|
||||||
Framework = "netcoreapp2.1",
|
Framework = "netcoreapp3.1",
|
||||||
Output = dotNetCoreCoverage.FullPath
|
Output = dotNetCoreCoverage.FullPath
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
5
global.json
Normal file
5
global.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"sdk": {
|
||||||
|
"version": "3.1.101"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user