Skip to content

Commit

Permalink
(docs) Second draft of documentation [skip ci].
Browse files Browse the repository at this point in the history
  • Loading branch information
larzw committed Nov 29, 2016
1 parent 3f23478 commit 39fa6e0
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 37 deletions.
28 changes: 16 additions & 12 deletions Documentation/Cake.Paket.Module.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cake.Paket.Module

In order to use paket instead of nuget in the preprocessor directive e.g. `#tool paket:?package=Cake.Foo` and/or `#addin paket:?package=Cake.Bar`, you will need include *Cake.Paket.Module* and ensure cake can find the module.
In order to use paket instead of nuget in the preprocessor directive e.g. `#tool paket:?package=Cake.Foo` and/or `#addin paket:?package=Cake.Bar`, you need to include *Cake.Paket.Module* and ensure cake can find the module.

# Basic Usage

Expand All @@ -18,18 +18,18 @@ Although the following directory structure is not required, we'll use it for our

The packages directroy is defined by [dependency groups](https://fsprojects.github.io/Paket/groups.html) in the [paket.dependencies](https://fsprojects.github.io/Paket/dependencies-file.html) file. Let's assume it looks like

```
```bash
# tools
group tools
source https://nuget.org/api/v2
nuget NUnit.ConsoleRunner=3.4.0
nuget OpenCover
nuget JetBrains.ReSharper.CommandLineTools
nuget Cake # Get Cake.exe

# addins
group addins
source https://nuget.org/api/v2
nuget Cake.Figlet=0.3.1
nuget Cake.Figlet

# modules
group modules
Expand Down Expand Up @@ -69,7 +69,7 @@ Our cake script can now use paket
// Use paket instead of nuget in the preprocessor directive.
// You need to specify the paket group in the URI.
#tool paket:?package=NUnit.ConsoleRunner&group=tools
#tool paket:?package=OpenCover&group=tools
#tool paket:?package=JetBrains.ReSharper.CommandLineTools&group=tools
#addin paket:?package=Cake.Figlet&group=addins

...
Expand Down Expand Up @@ -111,7 +111,7 @@ and our cake script can be simplified to
// Use paket instead of nuget in the preprocessor directive.
// You dont't need to specify the paket group in the URI.
#tool paket:?package=NUnit.ConsoleRunner
#tool paket:?package=OpenCover
#tool paket:?package=JetBrains.ReSharper.CommandLineTools
#addin paket:?package=Cake.Figlet

...
Expand All @@ -130,21 +130,25 @@ You can group the *paket.dependencies* file however you want! For example,

Let's consider the complex dependency file

```
```bash
# This is the same as using: group main
source https://nuget.org/api/v2
nuget NUnit.ConsoleRunner=3.4.0

group build/setup
source https://nuget.org/api/v2
nuget Cake.Figlet

# tools
group tools
source https://nuget.org/api/v2
nuget OpenCover
nuget JetBrains.ReSharper.CommandLineTools
nuget Cake

# addins
group addins
source https://nuget.org/api/v2
nuget Cake.Figlet=0.3.1
nuget Cake.Paket

# modules
group modules
Expand All @@ -156,9 +160,9 @@ and the cake script becomes

```csharp
#tool paket:?package=NUnit.ConsoleRunner&group=main
#tool paket:?package=OpenCover
#addin paket:?package=Cake.Figlet

#tool paket:?package=JetBrains.ReSharper.CommandLineTools
#addin paket:?package=Cake.Figlet&group=build/setup
#addin paket:?package=Cake.Paket
...
```

Expand Down
16 changes: 6 additions & 10 deletions Documentation/Cake.Paket.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Cake.Paket

In order to use paket commands such as `paket.exe pack ...` and/or `paket.exe push ...` you will need to include `#addin paket:?package=Cake.Paket`, where we assumed you are using [Cake.Paket.Module](Cake.Paket.Module.md).
In order to use paket commands such as `paket.exe pack ...` and/or `paket.exe push ...` you need to include `#addin paket:?package=Cake.Paket`, where we assumed you are using the [Cake.Paket.Module](Cake.Paket.Module.md).

# Basic Usage

Assuming you've read the section on [Cake.Paket.Module](Cake.Paket.Module.md), if you want to use paket commands, you'll need to include the addin *Cake.Paket* in the *paket.dependencies* file

```
```bash
# tools
group tools
source https://nuget.org/api/v2
Expand Down Expand Up @@ -53,16 +53,16 @@ exec mono ./packages/tools/Cake/Cake.exe --paths_modules=./packages/modules --pa

...

// Runs paket.exe pack output bar
// Runs paket.exe pack output "./NuGet"
Task("Paket-Pack").Does(() =>
{
PaketPack("bar");
PaketPack("./NuGet");
});

// Runs paket.exe push file bar/foo.nupkg
// Runs paket.exe push file "./NuGet/foo.nupkg" apikey ""00000000-0000-0000-0000-000000000000"
Task("Paket-Push").IsDependentOn("Paket-Pack").Does(() =>
{
PaketPush(bar/foo.nupkg);
PaketPush("./NuGet/foo.nupkg", new PaketPushSettings { ApiKey = "00000000-0000-0000-0000-000000000000" });
});

...
Expand All @@ -75,7 +75,3 @@ By default cake looks in the *.\\.paket* directory for *paket.bootstrapper.exe*.
1. Set the ToolPath in the cake script e.g. `new PaketPackSettings{ToolPath=".\.paket"}`
2. Add the flag *--paket* to *Cake.exe* e.g. `Cake.exe --paket=.\.paket`
3. Set the PAKET enviornment variable before calling *Cake.exe* e.g. `ENV:PAKET=.\.paket` or `export PAKET=./.paket`

## Paket Commands

An API for the paket commands can be found on Cake's website.
21 changes: 21 additions & 0 deletions Documentation/Maintainers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Maintainers

This section is for maintainers of the project.

## Creating a Release

Assuming the code has been merged into master and all CI builds are fine. To create a release:

* Update the *paket.template* file for the projects *Cake.Paket.Module* and *Cake.Paket.Addin*.
* Copyright
* Release Notes
* Update copyright info in *build.cake* (Setup).
* Create a signed git tag.
* Edit the github release notes and include any contributors.
* Create a NuGet package e.g. `./.paket/paket.exe pack output NuGet version 0.0.0`.
* Upload NuGet packages to nuget.org.
* Update the AppVeyor build version and push the change to github.

## Misc

* The [develop](http://cakepaket.readthedocs.io/en/develop/) branch documentation.
36 changes: 29 additions & 7 deletions Documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Allows the use of paket preprocessor directives and commands
```cake
// tools
#tool paket:?package=NUnit.ConsoleRunner&group=main
#tool paket:?package=OpenCover
#tool paket:?package=JetBrains.ReSharper.CommandLineTools

// addins
#addin paket:?package=Cake.Figlet&group=build/setup
Expand All @@ -28,7 +28,13 @@ Allows the use of paket preprocessor directives and commands
// Creates a nuget package
Task("Paket-Pack").Does(() =>
{
PaketPack("foo");
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" });
});

...
Expand All @@ -39,7 +45,7 @@ instead of using NuGet
```cake
// tools
#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
#tool nuget:?package=OpenCover
#tool nuget:?package=JetBrains.ReSharper.CommandLineTools

// addins
#addin nuget:?package=Cake.Figlet&version=0.3.1
Expand All @@ -49,21 +55,37 @@ instead of using NuGet
// Creates a nuget pacakge
Task("NuGet-Pack").Does(() =>
{
NuGetPack("bar.nuspec", new NuGetPackSettings{OutputDirectory = foo});
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

1. Get the modified [cake bootstrapper script](CakeBootstrapper.md).
2. Create a *modules* dependency group and add *Cake.Paket.Module* to your *paket.dependency* file
* Get the modified [cake bootstrapper script](https://github.com/larzw/Cake.Paket/blob/master/Documentation/CakeBootstrapper.md), then create a *tools* dependency group and add *Cake* to your *paket.dependencies* file
```bash
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
```bash
group modules
source https://nuget.org/api/v2
nuget Cake.Paket.Module
```
3. If you need to use paket commands such as *pack* and *push* then add `#addin paket:?package=Cake.Paket` to your cake script.

* Now you can use use paket instead of nuget in the preprocessor directive e.g. `#tool paket:?package=Cake.Foo` and/or `#addin paket:?package=Cake.Bar`.

* If you need to use paket commands such as *pack* and *push* then add `#addin paket:?package=Cake.Paket` to your cake script.

# Example Project

Expand Down
36 changes: 29 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Allows the use of paket preprocessor directives and commands
```cake
// tools
#tool paket:?package=NUnit.ConsoleRunner&group=main
#tool paket:?package=OpenCover
#tool paket:?package=JetBrains.ReSharper.CommandLineTools

// addins
#addin paket:?package=Cake.Figlet&group=build/setup
Expand All @@ -38,7 +38,13 @@ Allows the use of paket preprocessor directives and commands
// Creates a nuget package
Task("Paket-Pack").Does(() =>
{
PaketPack("foo");
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" });
});

...
Expand All @@ -49,7 +55,7 @@ instead of using NuGet
```cake
// tools
#tool nuget:?package=NUnit.ConsoleRunner&version=3.4.0
#tool nuget:?package=OpenCover
#tool nuget:?package=JetBrains.ReSharper.CommandLineTools

// addins
#addin nuget:?package=Cake.Figlet&version=0.3.1
Expand All @@ -59,21 +65,37 @@ instead of using NuGet
// Creates a nuget pacakge
Task("NuGet-Pack").Does(() =>
{
NuGetPack("bar.nuspec", new NuGetPackSettings{OutputDirectory = foo});
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

1. Get the modified [cake bootstrapper script](CakeBootstrapper.md).
2. Create a *modules* dependency group and add *Cake.Paket.Module* to your *paket.dependency* file
* Get the modified [cake bootstrapper script](https://github.com/larzw/Cake.Paket/blob/master/Documentation/CakeBootstrapper.md), then create a *tools* dependency group and add *Cake* to your *paket.dependencies* file
```bash
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
```bash
group modules
source https://nuget.org/api/v2
nuget Cake.Paket.Module
```
3. If you need to use paket commands such as *pack* and *push* then add `#addin paket:?package=Cake.Paket` to your cake script.

* Now you can use use paket instead of nuget in the preprocessor directive e.g. `#tool paket:?package=Cake.Foo` and/or `#addin paket:?package=Cake.Bar`.

* If you need to use paket commands such as *pack* and *push* then add `#addin paket:?package=Cake.Paket` to your cake script.

# Example Project

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image: Visual Studio 2015
version: '0.2.0-beta{build}'
version: '0.3.0-beta{build}'

environment:
COVERALLS_REPO_TOKEN:
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pages:
- 'Cake.Paket.Module': 'Cake.Paket.Module.md'
- 'Cake.Paket': 'Cake.Paket.md'
- 'Cake Bootstrapper': 'CakeBootstrapper.md'
- 'Maintainers': 'Maintainers.md'

0 comments on commit 39fa6e0

Please sign in to comment.