Cake v0.31.0 released

Published
Thursday, 13 December 2018
Category
Release Notes
Author
devlead

Version 0.31.0 of Cake has been released.

In this version we've got quite a few new features, improvements and fixes. A full list of changes is at end of this post, but first there's a few we would like to highlight.

Globber improvements

Cake's built-in globber has gone through a major overhaul, with several improvements. A few notable ones are:

  • Bracket wildcard
    • Specific: ba[rz] that matches "bar" or "baz"
    • Ranges: ba[a-zA-z] or ba[1-3] that matches "baa" or "ba1", among others
  • Brace expansion: foo{bar,baz} that would match "foobar" and "foobaz"
  • Negation in bracket wildcards (i.e [!Cc]at that would match "bat" but not "cat" or "Cat")
  • Support for UNC paths

Example usage:

FilePathCollection files = GetFiles($"./folder/fooba[rz].txt");

DirectoryPathCollection directories = GetDirectories($"./folder/fooba[rz]");

.NET Core Mono fallback on Unix

Full .NET Framework tools will usually execute fine on Windows even if running under .NET Core, but they'll fail on Unix systems. They don't know what to do with .NET Framework executables. With this release, Cake will inspect if tools with .exe extension have a proper .NET Framework PE header and then try to execute it with Mono if available.

This means that you'll be able to use .NET Framework tools even if you're using Cake.CoreCLR or Cake.Tool running under .NET Core, if you have Mono installed.

Version & Info arguments

The --version argument has changed to only output the Semantic Version of Cake i.e. 0.31.0, or 0.31.0-alpha0095, for a pre release. This will make it easier to check and verify available Cake version in scripts and bootstrappers.

You can still get the previous output by using the --info argument.

NuGet 4.9.2

Cake has been updated to use version 4.9.2 of the NuGet client libraries, which has several fixes, especially around performance and signed packages.

Contributions were included from:

Full details of everything that was included in this release can be seen below.

Issues

As part of this release we had 38 issues closed.

Feature

  • #2320 Alias for ScriptCallerInfo.
  • #2286 Add .NET build server shutdown alias "DotNetCoreBuildServerShutdown".
  • #2277 Add basic implementation of info command.
  • #2201 Extend supported globber patterns.
  • #2200 Support UNC paths.
  • #2198 Add GlobberSettings.
  • #2197 Don't rely on System.IO namespace for FilePath/DirectoryPath.
  • #1976 Add MSBuildSettings.NoLogo.
  • #1383 Add command line option to display build target graph.

Improvement

  • #2391 Upgrade to NuGet 4.9.2.
  • #2387 Extend GetTooolExecutableNames for GitVersion.
  • #2384 Add homebrew fallback path for MSBuild tool resolver.
  • #2369 Update Roslyn to 2.10.0.
  • #2350 In-process NuGet client should reuse package sources as specified in NuGet.Config if available.
  • #2341 Add support for JUnit Output Format.
  • #2332 TFBuild UploadArtifact commands should support directories.
  • #2312 Add method to expand environment variables to FilePath/DirectoryPath.
  • #2308 Use Mono for full framework executables if running on Unix & .NET Core.
  • #2306 Add VSTestReportPath to DotNetCoreTestSettings.
  • #2300 Make DotNetCoreTool alias project path optional add overloads without.
  • #2297 NUnit3Settings does not provide an option to specify the configuration file to load.
  • #2284 --version should only return sem/nuget version.
  • #2272 Update in-process NuGet client to support offline environments.
  • #2268 Add .NET Core tool support for Octopus aliases.
  • #2265 Update Roslyn to 2.9.0.
  • #2257 NuGetPack should have a version suffix setting.
  • #2255 Show warning when referenced package is missing version number.
  • #2246 Add NuGet projectUrl to nuspec/csproj packages.
  • #2245 Add symbols for Cake.Tool package.
  • #2061 NuGetPack overwrites developmentDependency and requireLicenseAcceptance from nuspec.
  • #1875 Folder structure of tools and addins can cause too long paths on Windows.

Documentation

  • #2385 Typo in BuildSystem.TeamCity property example.
  • #2365 Fixed typos.
  • #2267 Fix more 'occured' and 'occuring' typos.

Build

  • #2358 Use new license format in published nupkg’s.

Bug

  • #2342 Provide value for self-contained to support succeeding parameters.
  • #2310 Cake.Testing.Xunit RuntimeFact and RuntimeTheory doesn't work for .NET Core App.
  • #2252 Cake fails to start on posix systems if script / current directory is root ( / ).