Jaahas.Cake.Extensions 3.0.0

dotnet add package Jaahas.Cake.Extensions --version 3.0.0                
NuGet\Install-Package Jaahas.Cake.Extensions -Version 3.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jaahas.Cake.Extensions" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jaahas.Cake.Extensions --version 3.0.0                
#r "nuget: Jaahas.Cake.Extensions, 3.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Jaahas.Cake.Extensions as a Cake Addin
#addin nuget:?package=Jaahas.Cake.Extensions&version=3.0.0

// Install Jaahas.Cake.Extensions as a Cake Tool
#tool nuget:?package=Jaahas.Cake.Extensions&version=3.0.0                

About

Jaahas.Cake.Extensions is a recipe package for Cake, used to provide a common way of versioning and running builds using Cake.

How to Use

In the folder where your .NET solution file resides, create a version.json file that is structured as follows:

{
  "Major": 1,
  "Minor": 0,
  "Patch": 0,
  "PreRelease": ""
}

Update your build.cake file as follows:

const string DefaultSolutionFile = "./MySolution.sln";
const string VersionFile = "./version.json";

#load nuget:?package=Jaahas.Cake.Extensions&version=2.1.0

// Bootstrap build context and tasks.
Bootstrap(DefaultSolutionFile, VersionFile);

// Run the specified target.
Run();

Command Line Arguments

The following command line arguments are supported by the recipe:

Argument Description Default Value Allowed Values
--branch=<FRIENDLY BRANCH NAME> The friendly name of the source control branch that is being built. Ignored for Git repositories.
--project=<PROJECT OR SOLUTION> The MSBuild project or solution to build. DefaultSolutionFile constant in build.cake file
--target=<TARGET> The Cake target to run. Test Clean, Restore, Build, Test, Pack, Publish, PublishContainer, BillOfMaterials
--configuration=<CONFIGURATION> The MSBuild configuration to use. Debug; Release when the Pack, Publish or PublishContainer target is specified Any configuration defined in the MSBuild solution
--clean Specifies that this is a rebuild rather than an incremental build. All artifact, bin, and test output folders will be cleaned prior to running the specified target.
--no-tests Specifies that unit tests should be skipped, even if a target that depends on the Test target is specified.
--ci Forces continuous integration build mode. Not required if the build is being run by a supported continuous integration build system.
--sign-output Tells MSBuild that signing is required by setting the 'SignOutput' build property to 'True'. The signing implementation must be supplied by MSBuild.
--build-counter=<COUNTER> The build counter. This is used when generating version numbers for the build. -1
--build-metadata=<METADATA> Additional build metadata that will be included in the information version number generated for compiled assemblies.
--container-registry=<REGISTRY> The container registry to publish images to when calling the PublishContainer target. Local Docker or Podman registry. Any valid registry address. Registry authentication is managed by Docker or Podman. See here for more information.
--container-os=<OS> The container operating system to target. linux Any valid .NET runtime identifier operating system.
--container-arch=<ARCHITECTURE> The container processor architecture to use. The architecture for the operating system. Any valid .NET runtime identifier processor architecture.
--property=<PROPERTY> Specifies an additional property to pass to MSBuild. The value must be specified using a <NAME>=<VALUE> format e.g. --property="NoWarn=CS1591". This argument can be specified multiple times.
--github-username=<USERNAME> Specifies the GitHub username to use when making authenticated API calls to GitHub while running the BillOfMaterials task. You must specify the --github-token argument as well when specifying this argument.
--github-token=<PERSONAL ACCESS TOKEN> Specifies the GitHub personal access token to use when making authenticated API calls to GitHub while running the BillOfMaterials task. You must specify the --github-username argument as well when specifying this argument.

Targets

The recipe supports the following targets (specified by the --target parameter passed to Cake):

Target Description Default Build Configuration
Clean Cleans the obj, bin, artifacts and TestResults folders for the repository. Debug
Restore Restores NuGet packages for the solution. Debug
Build Builds the solution. Debug
Test Runs unit tests for the solution. Debug
Pack Creates NuGet packages for the solution. Release
Publish Publishes any solution projects that define one or more .pubxml publish profiles under the project folder. Release
PublishContainer Publishes container images for any solution projects that are registered as container projects. See below for more information. Release
BillOfMaterials Generates a Software Bill of Materials (SBOM) for the solution using CycloneDX. Release

The Default Build Configuration specifies the default MSBuild configuration used when specifying a target and the --configuration parameter is not specified.

Publishing Container Images

If your solution contains one or more projects that you want to publish container images for when the PublishContainer target is specified, you must include the names of the projects (without the project file extension) when calling the Bootstrap() method in your build.cake file. For example:

Bootstrap(
    DefaultSolutionFile, 
    VersionFile, 
    containerProjects: new [] {
        "MyFirstContainerProject",
        "MySecondContainerProject"
    });

Note that projects that publish container images can also define a .pubxml publish profile for publishing the image via the Publish target instead.

Additional Documentation

Additional documentation is available on GitHub.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 88 12/9/2024
2.3.0 91 11/28/2024
2.2.1 119 9/23/2024
2.1.0 111 9/18/2024
2.0.2 121 6/26/2024
2.0.1 226 4/15/2024
2.0.0 205 4/13/2024
1.7.0 353 8/10/2023
1.6.2 271 3/22/2023
1.6.1 227 3/21/2023
1.6.0 220 3/21/2023
1.5.0 528 9/14/2022
1.4.2 401 8/28/2022
1.4.1 414 8/27/2022
1.4.0 388 8/23/2022
1.3.1 422 8/23/2022
1.3.0 422 8/23/2022
1.2.0 408 8/18/2022
1.1.0 323 1/5/2022
1.0.0 334 12/15/2021