buildtool
Syntax
Description
Run Tasks
buildtool
invokes the build tool on the build file in your
project. It runs the default tasks in the plan defined by the build file as well as all
the tasks on which they depend.
By default, the command searches for a build file named buildfile.m
in your current folder or its parent folders. If the build file does not exist in your
current folder, the command searches through the parent folders until it finds
buildfile.m
.
buildtool
runs the
specified tasks as well as all the tasks on which they depend. The command runs the tasks
in the order specified. It runs each task at most one time and ignores a task in the list
that has already run.tasks
buildtool ___
specifies build options in addition to any of the input argument combinations in previous
syntaxes. For example, option1 ... optionN
buildtool -continueOnFailure
continues running
the build upon a failure.
List Tasks
buildtool -tasks
lists the tasks in your build file. The list
includes task names and descriptions.
buildtool -tasks all
also
lists the tasks in task groups. For more information about task groups, see Create Groups of Similar Tasks. (since R2024b)
Create Build File
buildtool -init
creates a
build file named buildfile.m
in your current folder (if one does not
exist). The build file contains tasks created from built-in task classes in the matlab.buildtool.tasks
namespace. You can use this build file as a starting
point to define your build. (since R2024a)
Examples
Input Arguments
Tips
To maintain valid relative paths in tasks at run time, the build tool changes the current folder to the plan root folder before running the build and restores the current folder to its original state after running the build. To prevent a task from affecting subsequent tasks by changing the current folder, the build tool also restores the current folder after running each task.