Share
Embed
Transcript
12 slides
-
Introduction to Cake (C# Make) • What is Cake? •
What makes Cake different? • Format of Cake Scripts • How to get started with Cake • Resources • Examples • Example extended • Thoughts -
What is Cake? • Cake is a tool for building
code • It allows you to build code in C# • It is cross platform compatible • You should always get the same experience • It integrates with other tools • Continuous Integration • Unit Testing • Build tools • It’s Open Source -
What makes Cake different? • Why would you use Cake?
• Building .NET Core applications on different platforms • You don’t want to get bogged down in other languages • You want to use your C# skills • You already have tools in place and want to just change the build script provider • You want the flexibility of Open Source software Cake is not a Continuous Integration platform and shouldn’t be used for this purpose -
Format of Cake Scripts • There are some key components
• Tasks • Dependencies • Criteria • Extending it out further with • Error Handling • Setup and Teardown • Arguments and variables • and more……. -
Tasks • Tasks are the basic building blocks of Cake
• Tasks essentially define a build • A cake build script is a list of tasks -
Dependency • Dependencies allow you to chain tasks together •
When you run your script you call the last task in the dependancy chain -
Criteria • Conditions that have to be satisfied before a
task is run • If you call a chain then these can stop everything -
How to get started with Cake • cakebuild.net • Getting
Started Section • Bootstrapping • Basic example script • Documentation • Fundamentals of Cake • Extensions • Tooling • Reference • Key commands, properties and inbuilt methods -
Examples on the website • Example with bootstrapped script online
• Scripts run through Powershell • Permissions are critical here • You can run on Linux using Mono and Bash • Example includes • .NET Solution • Class library • Unit Test Project • Cake Script • Cleans, builds and tests -
Extending the example • Adding a console application to run
a basic program • Uses the existing class library DLL • Changes to the example Build script • Adding tasks • Build the Console application • Clean out a deployment location • Deploy to a location • Running the deployed application • Let’s have a look -
Outcomes – My thoughts • Powerful tool • Cross platform
(.NET CORE Ready) • Easy to pick-up • .NET friendly • Integrates with various existing tools • Does require some exposure and experience • Not sure exactly what the motivation to move to it would be