-
Notifications
You must be signed in to change notification settings - Fork 4
Reference | Command Line
Script arguments allow to specify execution options, list of targets, logging options and others from command line.
According to fsi.exe --
arguments denotes the start of script arguments so in the most common case you will use it as:
fsi build.fsx -- clean build deploy
where "clean" "build" and "deploy" are target names.
In the command above the targets will be run one-by-one -- script will wait for completion of the task before starting the next one. Use command-separated list target1;target2;..targetN
to execute the targets simultaneously (in parallel).
The number of task that can run simultaneously is specified by -t
parameter:
fsi build.fsx -- -t 2 build-release;build-debug;deploy
Default value (if one was not specified in command line) is the number of processors.
Obviously, if task1 and task2 are started in parallel while task2 depends on task1, they will run sequentially. Parallel execution is only reasonable for independent tasks.
There several options to analyze current state of the artifacts and source files. --dryrun
causes xake to dump the dependencies graph, obtained and stored to build database dring previous run.
fsi build.fsx -- build --dryrun
Only those dependencies, that are changed and will trigger the build are listed:
XAKE build tool 0.9.3.274
[CMD] Running (dry) targets [["build"]]
[CMD] Rebuild "build" (~5ms)
[CMD] Rebuild "C:\projects\Xake\bin/Xake.Core.dll" (~1749ms)
[CMD] Rebuild "C:\projects\Xake\bin\FSharp.Core.dll" (~56ms)
[CMD] Rebuild "C:\projects\Xake\bin/XakeLibTests.dll" (~827ms)
[CMD] Rebuild "C:\projects\Xake\bin\nunit.framework.dll" (~23ms)
[MSG]
Build will be completed (estimate) in 2.637s
Dependencies graph and current state of each artifact are recorded in .xake
file in the build root folder. The database is used to skip rebuilding the targets which source code (and anything else it depends on) is not changed.
Use --dump
option will dump all recorded dependencies for particular targets:
fsi build.fsx -- build --dump
Drop this file whenever build script is changed and you observe any glitches.
By default under Windows platform xake will display progress info in the title bar of console window.
Use -p
option to output progress info to console output.
- -h -- displays help screen
- -t -- use simultaneous processes to execute the build tasks. * Default value is the number of processors
- -r -- override the root path. All the targets and filesets are resolved relatively to this path. Default is current directory
- -ll -- console log level (Silent | Quiet | Normal | Loud | Chatty | Diag)
- -fl -- specifies the name of the log file
- -fll -- specifies the logging level to a log file
- -d = -- defines a script variable value
- --dryrun - prints dependency graph and estimates the build duration
- --dump - prints dependency graph based on the last run
- --progress, -p - display progress indicator
- -nologo -- remove logo string
- 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
- ...