Skip to content
Prev Previous commit
Next Next commit
Doc, doc, doc !
  • Loading branch information
vbfox committed Oct 27, 2016
commit d960dc8130f65c32a4f733c94e62c4480f34b63c
35 changes: 26 additions & 9 deletions docs/content/bootstrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Cached paket.exe versions are removed when the NuGet cache folder is [cleared](p

## Options

### On the command line

`prerelease`: Downloads the latest paket.exe from github.com and includes prerelease versions.

`version`: Downloads the given version of paket.exe from github.com.
Expand All @@ -33,7 +35,7 @@ Cached paket.exe versions are removed when the NuGet cache folder is [cleared](p

`--help`: Shows a help page with all possible options.

## Application settings
### In Application settings

If present the paket.boostraper.exe.config file can be used to set AppSettings. When an option is passed on the command line the corresponding application setting is ignored.

Expand All @@ -56,15 +58,29 @@ Example file :

`PaketVersion`: Same as `version` option. Downloads the given version of paket.exe from github.com.

## Environment Variables
### In Environment Variables

`PAKET.VERSION`: The requested version can also be set using this environment variable. Above options take precedence over the environment variable

## Magic mode
### In paket.dependencies

If a [`paket.dependencies`](dependencies-file.html) file can be found in the current directory it can contain a
special comment containing options for the boostrapper.

When `paket.bootstrapper.exe` is renamed `paket.exe` the real `paket.exe` is downloaded to a temporary location and executed with all arguments passed directly.
The comment must start with `bootstrapper:` followed by normal command line arguments :

Some default arguments are also used for the bootstrapper to feel more like if it didn't exists.
```paket
#bootstrapper: 3.24.1

source https://api.nuget.org/v3/index.json
nuget FAKE
nuget FSharp.Core ~> 4
```

## Magic mode

When `paket.bootstrapper.exe` is renamed `paket.exe` the real `paket.exe` is downloaded to a temporary location and
executed with all arguments passed directly.

```batch
paket.exe add nuget FAKE
Expand All @@ -76,8 +92,9 @@ Would do the same thing as :
paket.bootstrapper.exe -s --max-file-age=720 --run add nuget FAKE
```

Even while renamed as `paket.exe` the bootstraper parameters can still be specified if `--run` is present:
Using this feature paket can be used simply by committing a ~50KB `paket.exe` to source control an using it directly.
The fact that a boostrapper exists is completely hidden and become an implementation detail that contributors to your
repository won't have to know — or care — about.

```batch
paket.exe --force-nuget --run add nuget FAKE
```
While command line bootstrapper options can't be used (Except if `--run` is passed) the other sources
(AppSettings, Environment Variables & paket.dependencies) can still be used to configure the bootstrapper.