-
Notifications
You must be signed in to change notification settings - Fork 4
Reference | Filesets
Oleg edited this page Mar 30, 2017
·
1 revision
Fileset represents the rules to collect list of files. Fileset is "materialized" on demand, the paths are resolved from a "root" folder defined as ProjectRoot in script settings.
There're several ways to define fileset. The most flexible and powerful one is to use fileset
computation:
let sourceFiles = fileset {
// define common prefix for all subsequent instructions
basedir "src"
// includes individual file
includes "assemblyinfo.cs"
// includes files by mask
includes "lib/*.cs"
// includes all files in src and all nested folders
includes "src/**/*.cs"
// excludes file assemblyinfo.cs from all nested folders
excludes "**/assemblyinfo.cs"
// includes the files by mask if first argument evaluates to true
includesif NUNIT "test/**/*.cs"
// instructs build script to fail if fileset contains no files
failonempty true
// joins another fileset
join commonFiles
}
Xake also provides several operators for manipulating filesets:
// create fileset from file mask
let sourceFiles = ls "src/*.cs"
// the same as
let sourceFiles = !! "src/*.cs"
// add files to fileset
let allSourceFiles = sourceFiles + "common/*.cs"
// set basedir "src"
let src = ls "*.cs" @@ "src"
- Creating simple script
- Running the first build
- What the rule and recipe is?
- Filesets defined
- Editing the script
- Configure your project and CI
- Defining filesets
- Recipe computation
- Declaring the rules
- Error handling and exceptions
- Script and environment settings
- Command line interface (CLI)
- Writing cross-platform scripts
- Build-in functions
- .NET tasks
- System tasks
- Other
- ...