1: 2: 3: 4: |
|
Yaaf.AdvancedBuilding buildConfig.fsx configuration
This file handles the configuration of the Yaaf.AdvancedBuilding build script.
The first step is handled in build.sh
and build.cmd
by restoring either paket dependencies or bootstrapping a NuGet.exe and
executing NuGet to resolve all build dependencies (dependencies required for the build to work, for example FAKE).
For details of paket look into http://fsprojects.github.io/Paket/ .
To be able to update build.sh
and build.cmd
with Yaaf.AdvancedBuilding the build.sh
and build.cmd
files in the project root directory delegate to
packages/Yaaf.AdvancedBuilding/content/build.sh
and packages/Yaaf.AdvancedBuilding/content/build.cmd
, which do the actual work.
When using NuGet instead of paket (or when using both), nuget packages from a packages.config
file are restored.
This only works if there is a NuGet.exe found, you can just drop the downloadNuget.fsx
file in your project root and Yaaf.AdvancedBuilding will make sure to
bootstrap a NuGet.exe into packages/Nuget.CommandLine
.
The second step is to invoke FAKE with build.fsx
which loads the current buildConfig.fsx
file and delegates the work to
packages/Yaaf.AdvancedBuilding/content/buildInclude.fsx
. For details about FAKE look into http://fsharp.github.com/FAKE .
In the remainder of this document we will explain the various configuration options for Yaaf.AdvancedBuilding.
1: 2: 3: 4: 5: |
|
Required config start
First We need to load some dependencies and open some namespaces.
1: 2: 3: 4: 5: 6: 7: 8: |
|
Main project configuration
Then we need to set some general properties of the project.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: |
|
Setup which nuget packages are created.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: |
|
With UseNuget
you can specify if Yaaf.AdvancedBuilding should restore nuget packages
before running the build (if you only use paket, you either leave it out or use the default setting = false).
1: 2: |
|
The GeneratedFileList
property
The GeneratedFileList
list is used to specify which files are copied over to the release directory.
This list is also used for documentation generation.
Defaults to [ x.ProjectName + ".dll"; x.ProjectName + ".xml" ] which is only enough for very simple projects.
1: 2: 3: |
|
You can change which AssemblyInfo files are generated for you. On default "./src/SharedAssemblyInfo.fs" and "./src/SharedAssemblyInfo.cs" are created.
1: 2: 3: 4: 5: 6: 7: 8: 9: |
|
Yaaf.AdvancedBuilding features
Setup the builds
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: |
|
enable mdb2pdb and pdb2mdb conversation for paket/nuget packages and your package. Note that mdb2pdb only works on windows so to get a cross platform debugging experience you: - either include the pdb file and can therefore only release on a windows machine - include a mdb and tell your users to use mdb2pdb on windows.
1:
|
|
We include a mdb so we can actually release on linux.
1: 2: |
|
FAKE settings
You can setup FAKE variables as well.
1: 2: 3: |
|
Remove ME!
This is specific to the Yaaf.AdvancedBuilding project, you can safely remove everything below.
1: 2: 3: 4: 5: |
|
Full name: BuildConfig.buildConfig
static member AppendAllLines : path:string * contents:IEnumerable<string> -> unit + 1 overload
static member AppendAllText : path:string * contents:string -> unit + 1 overload
static member AppendText : path:string -> StreamWriter
static member Copy : sourceFileName:string * destFileName:string -> unit + 1 overload
static member Create : path:string -> FileStream + 3 overloads
static member CreateText : path:string -> StreamWriter
static member Decrypt : path:string -> unit
static member Delete : path:string -> unit
static member Encrypt : path:string -> unit
static member Exists : path:string -> bool
...
Full name: System.IO.File
File.ReadLines(path: string, encoding: System.Text.Encoding) : IEnumerable<string>
type List<'T> =
new : unit -> List<'T> + 2 overloads
member Add : item:'T -> unit
member AddRange : collection:IEnumerable<'T> -> unit
member AsReadOnly : unit -> ReadOnlyCollection<'T>
member BinarySearch : item:'T -> int + 2 overloads
member Capacity : int with get, set
member Clear : unit -> unit
member Contains : item:'T -> bool
member ConvertAll<'TOutput> : converter:Converter<'T, 'TOutput> -> List<'TOutput>
member CopyTo : array:'T[] -> unit + 2 overloads
...
nested type Enumerator
Full name: System.Collections.Generic.List<_>
--------------------
List() : unit
List(capacity: int) : unit
List(collection: IEnumerable<'T>) : unit
Full name: Microsoft.FSharp.Collections.List.map
File.Copy(sourceFileName: string, destFileName: string, overwrite: bool) : unit