Pulsewave.Box.Recipe
                              
                            
                                1.0.0
                            
                        
                    See the version list below for details.
dotnet add package Pulsewave.Box.Recipe --version 1.0.0
NuGet\Install-Package Pulsewave.Box.Recipe -Version 1.0.0
<PackageReference Include="Pulsewave.Box.Recipe" Version="1.0.0" />
<PackageVersion Include="Pulsewave.Box.Recipe" Version="1.0.0" />
<PackageReference Include="Pulsewave.Box.Recipe" />
paket add Pulsewave.Box.Recipe --version 1.0.0
#r "nuget: Pulsewave.Box.Recipe, 1.0.0"
#:package Pulsewave.Box.Recipe@1.0.0
#load nuget:?package=Pulsewave.Box.Recipe&version=1.0.0
Pulsewave.Box.Recipe
 
 
Re-usable cake scripts to build, test, deploy, codeql, dependenbot, mutation testing, release for any projects.
Table of content
Documentation
Entry point
You should add a entry point to run all cake commands. This project and all box nugets follow a standard but it is not necessary to follow this standard for your own project.
- the entry point file should be named as main.cake
- Should load Pulsewave.Box.Recipenuget with latest version
- Should setup the project information
- Should have RunTarget(Argument<string>("run"));at the end of the file
Here an example
#load nuget:?package=Pulsewave.Box.Recipe&version=1.0.0
// Setup the main with a project.
Setup(context =>
{
    // The project on which the tasks are based
    Project project = new(context, new ProjectSettings
    {
        ProjectPath = "./src/Pulsewave.Box.Recipe/Pulsewave.Box.Recipe.csproj"
    });
    // Display additional information like the cake version and the project.
    Information($"Using Cake with the version: {context.GetVersion()}\n");
    Information(project);
    return project;
});
// You can add any task that you need like cleanup the folders, send an email, etc...
// The runner to run any command.
RunTarget(Argument<string>("run"));
Commands
- [command]is required to run a cake task.
- --[options]is a optional key/value pair.
dotnet cake main.cake --run [command] --[options]
| command | description | Dependency | 
|---|---|---|
| restore | Execute dotnet restorefor the current project. | none | 
| build | Execute dotnet buildfor the current project. | restore | 
| test | Execute dotnet testfor all test projects. | build | 
| pack | Execute dotnet packfor the current project. | none | 
| push | Execute dotnet nuget pushfor the current project. | none | 
options
| options | description | default | 
|---|---|---|
| configuration | Set the configuration ( Release,Debug) for the project. | Release | 
| output | Set the output directory when executing packcommand. | None | 
| code-coverage | Generate a code coverage report. | false | 
| all | Override ProjectPathwithPaths. | false | 
| beta | Create a beta version for the project. | beta.yyyyMMddHHmmss | 
| api-token | Set the NuGet api token when executing pushcommand. | None | 
| skip-duplicate | Skip duplicated NuGet when executing pushcommand. | true | 
| nuget | The NuGet folder to push the file when executing pushcommand. | none | 
| source | Set the NuGet source ( dev,prod) when executingpushcommand. | none | 
| validate | Validate the nupkg file if follow the nuget standard. | none | 
- dev NuGet source push to nugettest.org which is a testing environment for nugets.
- prod NuGet source push to nuget.org.
Project
Represent a project with predefined configurations.
Constructor
Initializes a new instance of the Project
- context: The context.
- settings: the project settings.
Project(ISetupContext context, ProjectSettings settings)
Properties
| Property | Description | 
|---|---|
| Name | Gets the project name based on ProjectSettings.ProjectPath. | 
| Settings | Gets the project settings. | 
| Metadata | Gets the project metadata. | 
| Configuration | Gets the project configuration. | 
Methods
ToString
Gets the project information.
The formatted string follow this format
Configuring {Name} in {Configuration.BuildConfiguration} build with arguments:
generate code coverage: {Metadata.HasCodeCoverageArgument}
restore/build all projects: {Metadata.HasAllArgument}
ProjectSettings
Represents the settings for a project.
Properties
| Property | Description | 
|---|---|
| ProjectPath | Gets the main project path. This property is required. | 
| TestPaths | Gets all test project paths. Default value is ./test/**/*.csproj. | 
| Paths | Gets all project paths. Default value is ./**/*.csproj. | 
| SolutionPath | Gets the solution path. Giving a value will override other paths. | 
Metadata
Represent additional data for a project.
Constructor
Initializes a new instance of the Metadata
- context: The context.
- projectPath: The project path.
Metadata(ISetupContext context, FilePath projectPath)
Properties
| Property | Description | 
|---|---|
| Version | Gets the project version. | 
| HasCodeCoverageArgument | Gets a value indicating whether have code coverage argument or not. | 
| HasAllArgument | Gets a value indicating whether have all argument or not. | 
| CurrentStep | Gets the incremented step. | 
| StepCount | Gets the step count. | 
Configuration
Represent the project configuration.
Constructor
Initializes a new instance of the Configuration
- context: The context.
- hasCodeCoverageArgument: Value indicating whether have code coverage argument or not.
Configuration(ICakeContext context, bool hasCodeCoverageArgument)
Properties
| Property | Description | 
|---|---|
| BuildConfiguration | Gets the build configuration. | 
| BuildSettings | Gets the build settings to build the project. | 
| TestSettings | Gets the test settings to test the project. | 
BuildConfiguration
Represent the build configuration.
| Value | Description | 
|---|---|
| BuildConfiguration.Release | The release configuration | 
| BuildConfiguration.Debug | The debug configuration | 
NuGetPackage
Represent a NuGet package.
Constructor
Initializes a new instance of the NuGetPackage
- context: The context.
- project: the project.
NuGetPackage(ICakeContext context, Project project)
Properties
| Property | Description | 
|---|---|
| Name | Gets the NuGet name based on Project.Name | 
| ProjectPath | Gets the project path. | 
| Version | Gets the NuGet version. | 
| PackSettings | Gets the pack settings to pack the NuGet. | 
| PushSettings | Gets the NuGet push settings to push the NuGet. | 
Methods
ToString
Gets the NuGet information.
The formatted string follow this format
{Name}.{Version}\n
ICakeContext extensions
Clean
Clean all folders based on a glob pattern.
- context: The ICakeContextcontext.
- pattern: The pattern to search folders to be cleaned.
void Clean(this ICakeContext context, GlobPattern pattern)
GetVersion
Gets the cake version.
- context: The ICakeContextcontext.
string GetVersion(this ICakeContext context)
| Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. | 
- 
                                                    net7.0- No dependencies.
 
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | 
|---|---|---|
| 1.2.0-beta.20230514130627 | 1 | 5/14/2023 | 
| 1.1.0-beta.20230514124233 | 2 | 5/14/2023 | 
| 1.1.0-beta.20230503233817 | 2 | 5/4/2023 | 
| 1.1.0-beta.20230422233551 | 2 | 4/23/2023 | 
| 1.1.0-beta.20230422230542 | 2 | 4/23/2023 | 
| 1.1.0-beta.20230422165622 | 1 | 4/22/2023 | 
| 1.1.0-beta.20230418230805 | 1 | 4/19/2023 | 
| 1.0.2-beta.20230326095016 | 0 | 3/26/2023 | 
| 1.0.1-beta.20230323212346 | 1 | 3/24/2023 | 
| 1.0.0 | 1 | 3/24/2023 | 
| 1.0.0-beta.20230323172640 | 1 | 3/24/2023 |