Skip to content

stgwilli/cake

 
 

Repository files navigation

#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.

Build status Coverity Scan

Follow @cakebuildnet Join the chat at https://gitter.im/cake-build/cake

##Table of contents

  1. Implemented functionality
  2. Example
  3. Documentation
  4. Bootstrapper
  5. Contributing
  6. External add-ons
  7. License

##Implemented functionality

This is a list of some the currently implemented functionality.
For a full list of supported tools, see the DSL reference.

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.

Documentation

You can read the latest documentation at http://cakebuild.net/.

Bootstrapper

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.

Contributing

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.

External add-ons

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

License

Copyright © 2014 - 2015, Patrik Svensson, Mattias Karlsson and contributors. Cake is provided as-is under the MIT license. For more information see LICENSE.

About

Cake (C# Make) is a build automation system.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.9%
  • PowerShell 0.1%