Skip to content

Commit

Permalink
Merge branch 'release/0.9.0'
Browse files Browse the repository at this point in the history
* release/0.9.0:
  (GH-161) Update to Cake 2.0
  (GH-158) Update to Cake 2.0 RC2
  Update Cake.* to 2.0.0-rc0001
  Update Mono.Cecil to 0.11.4
  Update Microsoft.Extensions.Logging to 6.0.0
  Update xunit.runner.visualstudio yo 2.4.3
  Update Xunit.Assert to 2.4.1
  Update xunit to 2.4.1
  Add #tool NuGet.CommandLine 5.11.0
  Update Microsoft.NET.Test.Sdk to 17.0.0
  (GH-154) Add Cake XMLDOC during publish * fixes #154
  • Loading branch information
gep13 committed Dec 1, 2021
2 parents 2a7057a + 19a2585 commit 68c579e
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 51 deletions.
3 changes: 2 additions & 1 deletion recipe.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#load nuget:?package=Cake.Recipe&version=2.2.0
#load nuget:https://api.nuget.org/v3/index.json?package=Cake.Recipe&version=2.2.0
#tool nuget:https://api.nuget.org/v3/index.json?package=SignClient&version=0.9.0
#tool nuget:https://api.nuget.org/v3/index.json?package=NuGet.CommandLine&version=5.11.0

Environment.SetVariableNames();

Expand Down
9 changes: 6 additions & 3 deletions src/Cake.Bakery.Tests/Cake.Bakery.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
<Import Project="..\Shared.props" />

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

Expand Down
10 changes: 6 additions & 4 deletions src/Cake.Bakery/Cake.Bakery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<WarningsAsErrors>true</WarningsAsErrors>
<PreserveCompilationContext>false</PreserveCompilationContext>
<OutputType>Exe</OutputType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<Description>The Cake script analyzer and code generator.</Description>
Expand All @@ -13,13 +15,13 @@
<InternalsVisibleTo Include="Cake.Bakery.Tests" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cake.Core" Version="1.3.0" />
<PackageReference Include="Cake.NuGet" Version="1.3.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
<PackageReference Include="Cake.Core" Version="2.0.0" />
<PackageReference Include="Cake.NuGet" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cake.Scripting.Abstractions\Cake.Scripting.Abstractions.csproj" />
<ProjectReference Include="..\Cake.Scripting.Transport\Cake.Scripting.Transport.csproj" />
<ProjectReference Include="..\Cake.Scripting\Cake.Scripting.csproj" />
</ItemGroup>
</Project>
</Project>
15 changes: 9 additions & 6 deletions src/Cake.Scripting.Tests/Cake.Scripting.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="1.3.0" />
<PackageReference Include="Cake.Testing" Version="1.3.0" />
<PackageReference Include="Mono.Cecil" Version="0.10.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Cake.Core" Version="2.0.0" />
<PackageReference Include="Cake.Testing" Version="2.0.0" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Cake.Scripting/Cake.Scripting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<InternalsVisibleTo Include="Cake.Scripting.Tests" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cake.Core" Version="1.3.0" />
<PackageReference Include="Cake.Common" Version="1.3.0" />
<PackageReference Include="Mono.Cecil" Version="0.10.1" />
<PackageReference Include="Cake.Core" Version="2.0.0" />
<PackageReference Include="Cake.Common" Version="2.0.0" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
<PackageReference Include="Basic.Reference.Assemblies.Net60" Version="1.2.4" />
</ItemGroup>
<ItemGroup>
Expand Down
19 changes: 0 additions & 19 deletions src/Cake.Scripting/Polyfill/IReferenceAssemblyResolver.cs

This file was deleted.

4 changes: 2 additions & 2 deletions src/Cake.Scripting/Reflection/GenericParameterSignature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static GenericParameterSignature Create(GenericParameter parameter)
{
var emitter = new TypeEmitter();
var parameterConstraints = parameter.Constraints.Select(
constraint => emitter.GetString(TypeSignature.Create(constraint)));
constraint => emitter.GetString(TypeSignature.Create(constraint.ConstraintType)));
constraints.AddRange(
parameterConstraints.Where(constraint => !constraint.Equals("System.ValueType")));
}
Expand All @@ -49,7 +49,7 @@ public static GenericParameterSignature Create(GenericParameter parameter)
var emitter = new TypeEmitter();
constraints.AddRange(
parameter.Constraints.Select(
constraint => emitter.GetString(TypeSignature.Create(constraint))));
constraint => emitter.GetString(TypeSignature.Create(constraint.ConstraintType))));
}
if (parameter.HasDefaultConstructorConstraint)
{
Expand Down
4 changes: 3 additions & 1 deletion src/Cake.Scripting/ScriptingModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
using Cake.Core.Composition;
using Cake.Core.Diagnostics;
using Cake.Core.IO;
using Cake.Core.Scripting;
using Cake.Scripting.Abstractions;
using Cake.Scripting.CodeGen;
using Cake.Scripting.CodeGen.Generators;
using Cake.Scripting.IO;
using Cake.Scripting.Reflection;
using IScriptAliasFinder = Cake.Scripting.CodeGen.IScriptAliasFinder;

namespace Cake.Scripting
{
Expand Down Expand Up @@ -42,7 +44,7 @@ public void Register(ICakeContainerRegistrar registrar)
registrar.RegisterType<CakeScriptAliasFinder>().As<IScriptAliasFinder>().Singleton();
registrar.RegisterType<CakeScriptGenerator>().As<IScriptGenerationService>().Singleton();
registrar.RegisterType<CakeAliasGenerator>().As<ICakeAliasGenerator>().Singleton();
registrar.RegisterType<ReferenceAssemblyResolver>().As<Core.Scripting.IReferenceAssemblyResolver>().Singleton();
registrar.RegisterType<ReferenceAssemblyResolver>().As<IReferenceAssemblyResolver>().Singleton();
}
}
}
25 changes: 22 additions & 3 deletions src/Shared.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
<PropertyGroup>
<PackageId>$(AssemblyName)</PackageId>
<Copyright>Copyright (c) .NET Foundation and contributors</Copyright>
<Authors>Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström, C. Augusto Proiete, Nils Andresen, and contributors</Authors>
<Company>Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström, C. Augusto Proiete, Nils Andresen, and contributors</Company>
<Authors>Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström, Dave Glick, Pascal Berger, Jérémie Desautels, Enrico Campidoglio, C. Augusto Proiete, Nils Andresen, and contributors</Authors>
<Company>Patrik Svensson, Mattias Karlsson, Gary Ewan Park, Alistair Chapman, Martin Björkström, Dave Glick, Pascal Berger, Jérémie Desautels, Enrico Campidoglio, C. Augusto Proiete, Nils Andresen, and contributors</Company>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>cake-medium.png</PackageIcon>
<RepositoryUrl>https://github.com/cake-build/bakery</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Cake;Script;Build</PackageTags>
<PublishDocumentationFile>true</PublishDocumentationFile>
<PublishReferencesDocumentationFiles>true</PublishReferencesDocumentationFiles>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -44,6 +49,20 @@
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

</Project>
<!-- https://github.com/dotnet/sdk/issues/1458 -->
<Target Name="Copy assemblies satellite symbols" AfterTargets="ResolveAssemblyReferences">
<ItemGroup>
<SymbolsSatelliteFiles Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).pdb')" Condition="$([System.IO.File]::Exists('%(RootDir)%(Directory)%(Filename).pdb'))"/>
<ReferenceCopyLocalPaths Include="@(SymbolsSatelliteFiles)"/>
</ItemGroup>
</Target>
<Target Name="Copy assemblies satellite symbols" AfterTargets="ResolveAssemblyReferences">
<ItemGroup>
<SymbolsSatelliteFiles Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')" Condition="$([System.IO.File]::Exists('%(RootDir)%(Directory)%(Filename).xml'))"/>
<ReferenceCopyLocalPaths Include="@(SymbolsSatelliteFiles)"/>
</ItemGroup>
</Target>
</Project>
4 changes: 2 additions & 2 deletions tests/integration/Cake.Bakery.Tests.Integration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xunit.Assert" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.1.1" />
<PackageReference Include="Xunit.Assert" Version="2.4.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Cake.Scripting.Abstractions\Cake.Scripting.Abstractions.csproj" />
Expand Down
8 changes: 5 additions & 3 deletions tests/integration/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Integration
{

class MonoScriptGenerationProcess : IScriptGenerationProcess
{
private readonly ILogger _logger;
Expand Down Expand Up @@ -278,8 +278,10 @@ static void Should_Install_Addins()
static int Main(string[] args)
{
var isRunningOnMono = !string.IsNullOrWhiteSpace(MonoRuntime);
var loggerFactory = new LoggerFactory()
.AddConsole(Microsoft.Extensions.Logging.LogLevel.Debug);
using var loggerFactory = LoggerFactory.Create(
builder => builder
.AddConsole()
.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Debug));

var bakeryPath = args[0];
workingDirectory = Environment.CurrentDirectory.Replace('\\', '/');;
Expand Down

0 comments on commit 68c579e

Please sign in to comment.