Giter VIP home page Giter VIP logo

cake's Introduction

#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

cakebuild.net

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

##Table of contents

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

##Roadmap

The Cake engine is pretty much done, but there are still improvements to be made. I'm still experimenting with the script API to make it as easy and intuitive as possible, so expect changes along the road.

A roadmap can be found here.

##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", "NuGet");
var configuration = Argument("configuration", "Release");

Task("Clean")
    .Does(() =>
{
    // Clean directories.
    CleanDirectory("./build");
    CleanDirectory("./build/bin");
    CleanDirectories("./src/**/bin/" + configuration);
});

Task("Restore-NuGet-Packages")
    .IsDependentOn("Clean")
    .Does(context =>
{
    // Restore NuGet packages.
    NuGetRestore("./src/Cake.sln");    
});

Task("Build")
    .IsDependentOn("Restore-NuGet-Packages")
    .Does(() =>
{
    MSBuild("./src/Cake.sln", s => 
        s.SetConfiguration(configuration));
});

Task("Unit-Tests")
    .IsDependentOn("Build")
    .Does(() =>
{
    XUnit("./src/**/bin/" + configuration + "/*.Tests.dll");
});

Task("Copy-Files")
    .IsDependentOn("Unit-Tests")
    .Does(() =>
{
    var sourcePath = "./src/Cake/bin/" + configuration;    
    var files = GetFiles(sourcePath + "/**/*.dll") + GetFiles(sourcePath + "/**/*.exe");
    var destinationPath = "./build/bin";

    CopyFiles(files, destinationPath);
});

Task("Pack")
    .IsDependentOn("Copy-Files")
    .Does(() =>
{   
    var root = "./build/bin";
    var output = "./build/" + configuration + ".zip";

    Zip(root, output);
});

Task("NuGet")
    .Description("Create NuGet package")
    .IsDependentOn("Pack")
    .Does(() =>
{
    // Create NuGet package.
    NuGetPack("./Cake.nuspec", new NuGetPackSettings {
        Version = "0.1.0",
        BasePath = "./build/bin",
        OutputDirectory = "./build",
        NoPackageAnalysis = true
    });
});

RunTarget(target);

###3. Run build script

C:\Project\Tools\Cake> Cake.exe ../../build.csx -verbosity=verbose -target=Pack

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.

cake's People

Contributors

patriksvensson avatar devlead avatar vktr avatar sharperad avatar redth avatar chrismissal avatar dbent avatar matdube avatar marcosnz avatar fredrikl avatar pkudrel avatar rosshammer avatar gitter-badger avatar colin-gourlay avatar wolfsoul13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.