TestCentric.Cake.Recipe
1.3.0
Prefix Reserved
See the version list below for details.
dotnet add package TestCentric.Cake.Recipe --version 1.3.0
NuGet\Install-Package TestCentric.Cake.Recipe -Version 1.3.0
<PackageReference Include="TestCentric.Cake.Recipe" Version="1.3.0" />
paket add TestCentric.Cake.Recipe --version 1.3.0
#r "nuget: TestCentric.Cake.Recipe, 1.3.0"
// Install TestCentric.Cake.Recipe as a Cake Addin #addin nuget:?package=TestCentric.Cake.Recipe&version=1.3.0 // Install TestCentric.Cake.Recipe as a Cake Tool #tool nuget:?package=TestCentric.Cake.Recipe&version=1.3.0
TestCentric.Cake.Recipe
TestCentric.Cake.Recipe is a standard cake recipe used for TestCentric projects. It is inspired by Cake.Recipe but is somewhat simpler in implementation, since it isn't intended for general use. The recipe is still under development.
Structure of the build.cake
File
The following is an example of a simple build.cake
file for a project which creates a single package.
// Load the recipe
#load nuget:?package=TestCentric.Cake.Recipe&version=1.1.0
// Initialize Build Settings
BuildSettings.Initialize(
context: Context,
title: "Sample Application",
githubRepository: "TestCentric.Sample.Application");
// Define the package
BuildSettings.Packages.Add(new NuGetPackage(
id: "TestCentric.Sample.Application",
source: "nuget/TestCentric.Sample.Application.nuspec",
checks: new PackageCheck[] {
HasFiles(
"LICENSE.txt", "README.md", "testcentric.png",
"lib/net8.0/testcentric.sample.application.dll") }));
// Run the task selected by user or default task
Build.Run();
NOTES:
The
#load
statement loadsTestCentric.Cake.Recipe
, specifying the version to use, in this case version 1.1.0. It is generally recommended that you specify the recipe version to avoid unpleasant surprises when the recipe is updated.BuildSettings.Initialize
sets the parameters which drive the build process. The example specifies only the three required paraameters. See below for a complete list of parameters.Define a single
nuget
package.Run the selected target. This must be the last command in the file.
Supported Arguments
The recipe supports a number of standard arguments for use in any project
that uses it. Additional arguments may be supported directly by the user's
build.cake
if necessary but must not conflict with the built-in arguments.
Arguments taking a value may use =
or space to separate the name
from the value.
--target, -t=TARGET
The name of the TARGET task to be run, e.g. Test. Default is "Build."
--configuration, -c=CONFIG
The name of the configuration to build, test and/or package, e.g. Debug. Defaults to Release.
--packageVersion, --package=VERSION
Specifies the full package version, including any pre-release suffix. This version is used directly instead of the default version from the script or that calculated by GitVersion. Note that all other versions (AssemblyVersion, etc.) are derived from the package version.
NOTE: We can't use "version" since that's an argument to Cake itself.
--testLevel, --level=LEVEL
Specifies the level of package testing, which is normally set automatically for different types of builds like CI, PR, etc. Used by developers to test packages locally without creating a PR or publishing the package. Defined levels are
- Normal CI tests run every time you build a package
- Adds more tests for PRs and Dev builds uploaded to MyGet
- Adds even more tests prior to publishing a release
--trace=LEVEL
Specifies the default trace level for this run. Values are Off, Error, Warning, Info or Debug. Default is value of environment variable TESTCENTRIC_INTERNAL_TRACE_LEVEL if set. If not, tracing is turned Off.
--nobuild
Indicates that the Build task should not be run even if other tasks depend on it. The existing build is used instead.
--nopush
Indicates that no publishing or releasing should be done. If publish or release targets are run, a message is displayed.
--usage
Displays this help message. No targets are run.
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.
LINK TO RELEASE NOTESNo release notes provided.