#Cake
Cake (C# Make) is a build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages.
##Table of contents
##Implemented functionality
This is a list of some the currently implemented functionality.
For a full list of supported tools, see the DSL reference.
- MSBuild
- MSTest
- xUnit (v1)
- xUnit (v2)
- NUnit
- NuGet
- Pack
- Push
- Restore
- Sources
- ILMerge
- WiX
- Candle
- Light
- SignTool
- File operations
- Copying
- Moving
- Deleting
- Directory operations
- Creation
- Cleaning
- Deleting
- File/Directory globbing
- Compression (zip)
- AssemblyInfo patching
- Release notes parser
- AppVeyor
- MSBuild Resource
- Solution file parsing
- Project file parsing
- Octopus deploy
- Create release
For more information and examples of how to use Cake, see the Documentation.
##Example
###1. Download Cake
C:\Project> NuGet.exe install Cake -OutputDirectory Tools -ExcludeVersion
###2. Create build script
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
// Define directories.
var buildDir = Directory("./src/Example/bin") + Directory(configuration);
Task("Clean")
.Does(() =>
{
CleanDirectory(buildDir);
});
Task("Restore-NuGet-Packages")
.IsDependentOn("Clean")
.Does(() =>
{
NuGetRestore("./src/Example.sln");
});
Task("Build")
.IsDependentOn("Restore-NuGet-Packages")
.Does(() =>
{
MSBuild("./src/Example.sln", new MSBuildSettings()
.UseToolVersion(MSBuildToolVersion.NET45)
.SetVerbosity(Verbosity.Minimal)
.SetConfiguration(configuration));
});
Task("Run-Unit-Tests")
.IsDependentOn("Build")
.Does(() =>
{
XUnit2("./src/**/bin/" + configuration + "/*.Tests.dll");
});
Task("Default")
.IsDependentOn("Run-Unit-Tests");
RunTarget(target);
###3. Run build script
C:\Project\Tools\Cake> Cake.exe ../../build.cake -verbosity=verbose -target=Build
You could of course use a bootstrapper script if you want to.
You can read the latest documentation at http://cakebuild.net/.
The Cake Bootstrapper is a Powershell cmdlet that helps you set up a new Cake build by downloading dependencies, setting up the bootstrapper script and creating a Cake build script.
So you’re thinking about contributing to Cake? Great! It’s really appreciated.
Make sure you've read the contribution guidelines before sending that epic pull request.
- Fork the repository.
- Make your feature addition or bug fix.
- Don't forget the unit tests.
- Send a pull request. Bonus for topic branches. Funny .gif will be your reward.
Cake.AliaSql: https://www.nuget.org/packages/Cake.AliaSql
Cake.Unity: https://github.com/patriksvensson/Cake.Unity
Cake.Slack: https://github.com/WCOMAB/Cake.Slack
Copyright © 2014 - 2015, Patrik Svensson, Mattias Karlsson and contributors. Cake is provided as-is under the MIT license. For more information see LICENSE.
- For Roslyn, see https://github.com/dotnet/roslyn/blob/master/License.txt
- For Mono.CSharp, see https://github.com/mono/mono/blob/master/mcs/LICENSE
- For Autofac, see https://github.com/autofac/Autofac/blob/master/LICENSE
- For NuGet.Core, see https://nuget.codeplex.com/license