Skip to content

Releases: ap0llo/shared-build

v4.0.29

22 Dec 14:58
Compare
Choose a tag to compare

New Features

Bug Fixes

Breaking Changes

Details

Skip execution of the "ValidateCodeFormatting" task when build is running on Azure Pipelines

Running dotnet format on Azure Pipelines when using the .NET 9 SDK and Nerdbank.GitVersioning is installed causes the build to hang (see dotnet/sdk#44951).

To work around this, skip the task when running on Azure Pipelines and emit a warning about the task being skipped

Upgrade to .NET 9 and Cake 5

Breaking Change

GitHub Actions Integration: Add GitHub Actions support

Add support to all tasks for running builds on GitHub Actions instead of Azure Pipelines.

Include Cake.BuildSystems module by default

Include Cake.BuildSystems.Module in the SharedBuild package's dependencies and enable support for Azure Pipelines and GitHub Actions implicitly in UseSharedBuild().

This removes the need to explicitly install and load the modules in projects using the SharedBuild package.

Make reporting of code coverage more consistent (#152)

Adjust how code coverage reports are generated and make behavior consistent between local and CI builds

  • The combined coverage data (Cobertura.xml) will be placed directly in the code coverage output directory

  • The "Report" directory will always contain a HTML report (no longer a Azure Pipelines specific report when running on Azure Pipelines.

  • The HTML report as well as the Cobertura.xml is now published as pipeline artifact on both Azure Pipelines and GitHub Actions

  • The Azure Pipelines-specific HTML report that is shown in the web UI is now generated in a temporary directory (and only when publishing results to Azure Pipelines)

  • Pull Request: #152

  • Commit: 3ddb9b4

Fix detection of Pull Request builds on Azure Pipelines

v3.0.10

11 Aug 10:21
Compare
Choose a tag to compare

New Features

Bug Fixes

Breaking Changes

Details

Retarget project to .NET 8

Breaking Change

Switch to the .NET 8 SDK and retarget all projects to .NET 8

  • Pull Request: #112
  • Updates-dependency: dotnet-sdk
  • Updates-dependency-from-version: 7.0.400
  • Updates-dependency-to-version: 8.0.303
  • Co-authored by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Co-authored by: Andreas Grünwald <[email protected]>
  • Co-authored by: GitHub Actions <[email protected]>
  • Commit: d96e146

Fix push of NuGet packages to Azure Artifacts

When the Azure Artifacts nuget feed being pushed to was already present in a repository's NuGet.config, the "Push" task failed because the same url cannot be added twice to a NuGet config.

To avoid this error (and also avoid updating any files under source control), use a NuGet.config in a temporary directory for the push to Azure Artifacts.

Fix crash in SetGitHubMilestone if a PR's id exceeds int.MaxValue

Update dependency Cake.GitHub to commit 2c1f2f3.
This version of Cake.GitHub uses Octokit 13.0.1 which should fix issues in the SetGitHubMilestone task caused by GitHub's ids exceeding int.Maxvalue

v2.4.20

25 Aug 20:07
Compare
Choose a tag to compare

Add support for repositories where the main branch is named "main" instead of "master"

Rename IGitContext's "IsMasterBranch" property to "IsMainBranch" and match on both "master" and "main" branches

v2.3.4

31 Dec 16:41
Compare
Choose a tag to compare

Add option to customize settings passed to "dotnet test"

Allow customization of the "DotNetTestSettings" passed to "dotnet test" in the "Test" task.

To customize the test settings, create a custom test task derived from "TestTask" and override GetDotNetTestSettings()

v2.2.42

21 Dec 21:13
Compare
Choose a tag to compare

New Features

Details

Add .NET 7 Support

Add .NET 7 build target in addition to the existing .NET 6 target and run tests on both frameworks

Update to Cake 3.0

Upgrade the underlying version of Cake to version 3.0

v2.1.56

28 May 20:42
Compare
Choose a tag to compare

New Features

Bug Fixes

Details

Set verbosity of cake log to Diagnostic when environment variable "SYSTEM_DEBUG" is set to true

On Azure Pipelines, the System.Debug variable enables detailed logging of the Azure Pipline tasks. To ease debugging build issues, increase the verbosity of the Cake log as well when this variable is set.

Use Cake's built-in aliases for "dotnet format" (introduced in Cake 2.1) instead of the custom alias

Remvoe the custom tool alias for the "dotnet format" command and replace them with the new aliases introduced in Cake 2.1

Add option to disable automatic code formatting

Add property IBuildContext.CodeFormattingSettings.EnableAutomaticFormatting that enables/disables automatic formatting of code as well as the validation of the code formatting.
Defaults to true (keeping existing behaviour)

Add option to exclude directories from code formatting

Add property IBuildContext.CodeFormattingSettings.ExcludedDirectories to configure directories to which code formatting rules do not apply.
These directories will excluded from both automatic formatting as well as validation of the code formatting.

Replace usage of the "Cake.GitHubReleases" modules with the module "Cake.GitHub"

Use Releases functionality in the Cake.GitHub module instead of Cake.GitHubReleases
Since the version of Cake.GitHub that is currently on NuGet does not yet include the Releases functionality, include Cake.GitHub as git submodule

Add information about whether the build is a Pull Request Build and the Pull Request number to the build context

Add properties "IBuildContext.GitHub.PullRequest.IsPullRequest" and "IBuildContext.GitHub.PullRequest.Number" that provide
information about whether the current build is a Pull Request build and the Pull Request number.

The information is being provided by the Azure Pipelines provider, so it will only be available when running on Azure Pipelines

Automatically assign Pull Requests to GitHub Milestones

When building a Pull Request in CI, automatically assign the Pull Request being built to a GitHub milestone for the current version.

The name of the Milestone is determined from the version being built using the format 'v<MAJOR>.<MINOR>'.

Decrease verbosity of GenerateChangeLogTask task

Do not set the "--verbose" flag when calling the "changelog" tool

Abort build when test execution fails

When test execution fails, abort build with an error instead of just logging the error and continuing the build

Skip restore in "dotnet format" call

dotnet format seems to run into issues trying to restore packages.
Since the restore seems o not be really required, disable the implicit restore for both the "ValidateCodeFormatting" and "FormatCode" tasks

v2.0.4

08 Jan 16:09
Compare
Choose a tag to compare

Abort build when test execution fails

When test execution fails, abort build with an error instead of just logging the error and continuing the build

v2.0.3

27 Dec 21:59
Compare
Choose a tag to compare

New Features

Breaking Changes

Details

Upgrade to Cake 2.0

Breaking Change

Upgrade to verison 2.0 of Cake and bump version to 2.0 to reflect that change.
Because of breakign changes in Cake, version 2 of the shared build tasks must only be used with Cake.Frosting 2.0

Do not implicitly load the AzurePipelines modules

Breaking Change: To include the Azure Pipelines modules, reference the package "Cake.BuildSystems.Module" and include "UseModule<AzurePipelinesModule>()" in the setup of the Cake host.

The UseSharedBuild() method will no longer automatically load the AzurePipelines module from the Cake.BuildSystems.Module package to reduce the dependencies of the Shared Build package.

Instead, the buildsystems package should be referenced by build projects using the shared build tasks directly.

v1.0.24

27 Dec 18:53
Compare
Choose a tag to compare

Initial stable release