Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Making cross-platform builds a piece of Cake

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Making cross-platform builds a piece of Cake

Lightning talk from .NET Fringe 2017 conference in Portland OR.

Presentation included demos, hence the patchy slides.

Avatar for Alistair Chapman

Alistair Chapman

June 05, 2017

More Decks by Alistair Chapman

Other Decks in Technology

Transcript

  1. What is Cake? Cake is a cross-platform build automation system

    with a C# DSL to do things like compiling code, copying files/folders, running unit tests, compressing files and building NuGet packages. Scripts are written in C# Fully cross-platform Built for every CI system, including your laptop Support for dozens of tools out of the box Now 150 community addins 3
  2. What does a script look like? /////////////////////////////////////////////////////////////////////////////// // ARGUMENTS ///////////////////////////////////////////////////////////////////////////////

    var target = Argument("target", "Default"); /////////////////////////////////////////////////////////////////////////////// // SETUP / TEARDOWN /////////////////////////////////////////////////////////////////////////////// Setup(ctx => { // Executed BEFORE the first task. Information("Running tasks..."); }); Teardown(ctx => { // Executed AFTER the last task. Information("Finished running tasks."); }); /////////////////////////////////////////////////////////////////////////////// // TASKS /////////////////////////////////////////////////////////////////////////////// Task("Default") .Does(() => { Information("Hello Cake!"); }); RunTarget(target); 4