Adds paket support to cake.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.paket [skip ci] Preparing for release 3.0.0 Jul 8, 2018
Source [skip ci] Preparing for release 4.0.0 Jul 8, 2018
.editorconfig added editor config file Nov 7, 2016
.gitattributes Clean up. Aug 8, 2017
.gitignore
.travis.yml removed osx from travis build. Jul 8, 2018
LICENSE Clean up. Aug 8, 2017
README.md updated href for nuget and readme file. Jan 25, 2018
appveyor.yml added deploy back Aug 9, 2017
build.ps1 (GH-9) Using the NuGet package Cake.NuGet now. Jul 3, 2017
build.sh
paket.dependencies updated to cake 0.28.1 Jul 8, 2018
paket.lock
setup.cake fixed build Jan 25, 2018

README.md

Cake.Paket

AppVeyor branch Travis branch Codecov branch NuGet NuGet Gitter

Adds Paket support to Cake via a Cake addin and module.

Features

Allows the use of paket preprocessor directives and commands

// tools
#tool paket:?package=NUnit.ConsoleRunner&group=main
#tool paket:?package=JetBrains.ReSharper.CommandLineTools

// addins
#addin paket:?package=Cake.Figlet&group=build/setup
#addin paket:?package=Cake.Paket

...

// Restores packages
Task("Paket-Restore").Does(() =>
{
    PaketRestore();
});

// Creates a nuget package
Task("Paket-Pack").Does(() =>
{
    PaketPack("./NuGet");
});

// Push a nuget package
Task("Paket-Push").IsDependentOn("Paket-Pack").Does(() =>
{
    PaketPush("./NuGet/foo.nupkg", new PaketPushSettings { ApiKey = "00000000-0000-0000-0000-000000000000" });
});

...

instead of using NuGet

// tools
#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
#tool nuget:?package=JetBrains.ReSharper.CommandLineTools

// addins
#addin nuget:?package=Cake.Figlet&version=0.3.1

...

// Restores packages
Task("NuGet-Restore").Does(() =>
{
    NuGetRestore("solution.sln");
});

// Creates a nuget pacakge
Task("NuGet-Pack").Does(() =>
{
    NuGetPack("bar.nuspec", new NuGetPackSettings{OutputDirectory = "./NuGet"});
});

// Push a nuget pacakge
Task("NuGet-Push").IsDependentOn("Paket-Pack").Does(() =>
{
    NuGetPush("./NuGet/foo.nupkg", new NuGetPushSettings{ApiKey = "00000000-0000-0000-0000-000000000000"});
});

...

Quick Start

Cake.Paket.Module

If you want to use paket instead of nuget in the preprocessor directive e.g. #tool paket:?package=Cake.Foo and/or #addin paket:?package=Cake.Bar then you need to use Cake.Paket.Module.

  • Get the modified cake bootstrapper script, then create a tools dependency group and add Cake to your paket.dependencies file
    group tools
        source https://nuget.org/api/v2
        nuget Cake
  • Create a modules dependency group and add Cake.Paket.Module to your paket.dependencies file
    group modules
        source https://nuget.org/api/v2
        nuget Cake.Paket.Module
  • Now you can use paket instead of nuget in the preprocessor directive.

Cake.Paket (addin)

If you need to use paket commands such as restore, pack, and push then add #addin paket:?package=Cake.Paket if your using the Cake.Paket.Module, otherwise add #addin nuget:?package=Cake.Paket and #tool nuget:?package=Paket.

Note that if you use #addin nuget:?package=Cake.Paket you can use the cake teams default bootstrappers build.ps1 and/or build.sh.

Example Project

Cake.Paket.Example is an example project which uses Paket with Cake. Additionally, the project for the paket addin and module is another good resource, see setup.cake.

Documentation

Contributing

All types of contributions are welcome!

Questions

Feel free to open an issue or @larzw me via Gitter