diff --git a/.github/workflows/netcore.yml b/.github/workflows/netcore.yml index d5632a9a..0871ccba 100644 --- a/.github/workflows/netcore.yml +++ b/.github/workflows/netcore.yml @@ -20,9 +20,8 @@ jobs: steps: - uses: actions/checkout@v1 - name: Setup .NET Core - uses: actions/setup-dotnet@v1.4.0 - with: - dotnet-version: 3.1.201 + uses: actions/setup-dotnet@v1 + - name: Build with dotnet run: ./build.sh --linksources=true --verbosity=verbose shell: bash diff --git a/appveyor.yml b/appveyor.yml index f064973a..8b4197b5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,6 @@ init: build_script: - dotnet --info - - dotnet tool install --global coverlet.console - ps: .\build.ps1 -LinkSources -Verbosity Verbose test: off diff --git a/build/Build.csproj b/build/Build.csproj index 962e1be8..87d7344e 100644 --- a/build/Build.csproj +++ b/build/Build.csproj @@ -3,11 +3,12 @@ Exe netcoreapp3.1 + $(MSBuildProjectDirectory)/.. - + diff --git a/build/Lifetime.cs b/build/Lifetime.cs index e8ecaf7c..4d3ff413 100644 --- a/build/Lifetime.cs +++ b/build/Lifetime.cs @@ -4,6 +4,7 @@ using Cake.Common.Build; using Cake.Common.Diagnostics; using Cake.Frosting; using Cake.Core.Diagnostics; +using Cake.Core; public class Lifetime : FrostingLifetime { @@ -51,7 +52,8 @@ public class Lifetime : FrostingLifetime new Project { Name = "Octokit.Tests.Integration", Path = "./Octokit.Tests.Integration/Octokit.Tests.Integration.csproj", IntegrationTests = true } }; - context.GitVersionToolPath = ToolInstaller.DotNetCoreToolInstall(context, "GitVersion.Tool", "5.1.3", "dotnet-gitversion"); + context.GitVersionToolPath = ToolInstaller.DotNetCoreToolInstall(context, "GitVersion.Tool", "5.6.5", "dotnet-gitversion"); + ToolInstaller.DotNetCoreToolInstall(context, "coverlet.console", "1.7.2", "coverlet"); // Calculate semantic version. context.Version = BuildVersion.Calculate(context); @@ -82,4 +84,8 @@ public class Lifetime : FrostingLifetime } return arg; } + + public override void Teardown(Context context, ITeardownContext info) + { + } } diff --git a/build/Program.cs b/build/Program.cs index a5c08a10..a729cfc2 100644 --- a/build/Program.cs +++ b/build/Program.cs @@ -1,24 +1,13 @@ -using Cake.Core; using Cake.Frosting; -public class Program : IFrostingStartup +public class Program { public static int Main(string[] args) { - // Create the host. - var host = new CakeHostBuilder() - .WithArguments(args) - .UseStartup() - .Build(); - - // Run the host. - return host.Run(); - } - - public void Configure(ICakeServices services) - { - services.UseContext(); - services.UseLifetime(); - services.UseWorkingDirectory(".."); + return new CakeHost() + .UseContext() + .UseLifetime() + .Run(args); +; } } \ No newline at end of file