Cake.Sitecore 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Cake.Sitecore --version 0.1.1                
NuGet\Install-Package Cake.Sitecore -Version 0.1.1                
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="Cake.Sitecore" Version="0.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cake.Sitecore --version 0.1.1                
#r "nuget: Cake.Sitecore, 0.1.1"                
#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 Cake.Sitecore as a Cake Addin
#addin nuget:?package=Cake.Sitecore&version=0.1.1

// Install Cake.Sitecore as a Cake Tool
#tool nuget:?package=Cake.Sitecore&version=0.1.1                

Cake.Sitecore

Overview

The library provides a set of pre-build [CAKE build] tasks. Those tasks could be used to simplify a configuration of CI/CD for Helix-based Sitecore projects.

Rationale

Cake (C# Make) is a cross-platform build automation system with a C# DSL for tasks such as compiling code, copying files and folders, running unit tests, compressing files and building NuGet packages. It should be familiar for a Sitecore developers as script are written in C# and it is possible to use .NET dll and NuGet packages in them. The library also provides a set of ready tasks that could be configured with environment variables, arguments and inside script, which makes it highly suitable for DevOps. As those tasks are decoupled from your build server - it makes your process highly portable (TeamCity, Jenkins, VSTS or even local machine - doesn't really matter).

Setup

In order to use the library you need to follow the standard initial setup from CAKE. Once you have 3 required files build.ps1, build.cake and tools/packages.json, open build.cake and add following sections there:

// //////////////////////////////////////////////////
// Dependencies
// //////////////////////////////////////////////////
#tool nuget:?package=Cake.Sitecore&prerelease
#load nuget:?package=Cake.Sitecore&prerelease

// ... other includes 

// //////////////////////////////////////////////////
// Arguments
// //////////////////////////////////////////////////
var Target = ArgumentOrEnvironmentVariable("target", "", "Default");

// //////////////////////////////////////////////////
// Prepare
// //////////////////////////////////////////////////

Sitecore.Constants.SetNames();
Sitecore.Parameters.InitParams(
    context: Context, // Pass CAKE context to a library
    msBuildToolVersion: MSBuildToolVersion.Default, // Select required version
    solutionName: "Habitat", // Name of your solution
    scSiteUrl: "https://sc9.local", // URL of a site
    // ... other parameters
);

// //////////////////////////////////////////////////
// Tasks
// //////////////////////////////////////////////////

Task("Restore")
    // predefined tasks could be used as a dependency for your build step
    .IsDependentOn(Sitecore.Tasks.RestoreNuGetPackagesTask) 
    .IsDependentOn(Sitecore.Tasks.RestoreNpmPackagesTaskName)
    ;

// ... other tasks

// //////////////////////////////////////////////////
// Targets
// //////////////////////////////////////////////////

Task("Default")
    .IsDependentOn("Restore")
    // ... other tasks
    ;

// //////////////////////////////////////////////////
// Execution
// //////////////////////////////////////////////////

RunTarget(Target);

Samples

Sample usage of a CAKE-build with Habitat could be found in here

Contributing

Any feedback, issues or pull requests pull requests are welcome and greatly appreciated.

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
1.0.27 28,644 8/10/2021
1.0.26 405 8/10/2021
1.0.25 2,166 2/17/2021
1.0.20 6,187 5/6/2020
1.0.19 749 4/27/2020
1.0.17 15,050 5/30/2019
1.0.16 8,756 2/24/2019
1.0.15 3,214 2/15/2019
1.0.14 2,217 2/1/2019
1.0.13 2,832 12/20/2018
1.0.12 1,382 11/29/2018
1.0.11 801 11/28/2018
1.0.10 1,199 11/14/2018
1.0.9 1,113 10/29/2018
1.0.8 824 10/27/2018
1.0.7 844 10/22/2018
1.0.6 877 10/17/2018
1.0.5 918 10/11/2018
1.0.4 844 10/10/2018
1.0.3 1,582 9/7/2018
1.0.2 1,026 8/28/2018
1.0.1 909 8/22/2018
0.2.0 1,086 7/22/2018
0.1.3 1,167 6/14/2018
0.1.1 1,102 5/27/2018
0.1.0 1,105 5/15/2018