chmod()
def chmod(name, mode, path, deps, type, inputs, working_directory, expect)Changes the mode of a file or directory.
Args
name-strThe name of the rule.mode- The source file or directory.path-strThe path/file to change permissions for.deps-[str]The dependencies for the copy command.type-enumThe type of the command.inputs-[str]The inputs for the command.working_directory-strThe working directory for the command.expect-enumSuccess | Failure
cp()
def cp(name, source, destination, options, deps, type, inputs, working_directory, expect)Copy a file or directory from source to destination.
Args
name-strThe name of the rule.source-strThe source file or directory.destination-strThe destination file or directory.options-[str]The options for the copy command.deps-[str]The dependencies for the copy command.type-enumThe type of the command.inputs-[str]The inputs for the command.working_directory-strThe working directory for the command.expect-enumSuccess | Failure
ln()
def ln(name, source, destination, options, deps, type, inputs, working_directory, expect)Create a link from source to destination.
Args
name-strThe name of the rule.source-strThe source file or directory.destination-strdestination or target (to be created).options-[str]The options for the copy command.deps-[str]The dependencies for the copy command.type-enumThe type of the command.inputs-[str]The inputs for the command.working_directory-strThe working directory for the command.expect-enumSuccess | Failure
ls()
def ls(name, path, options, deps, type, inputs, working_directory, expect)Run ls (this can be handy for checking if something exists).
Args
name-strThe name of the rule.path-strThe directory to list.options-[str]The options for the ls command.deps-[str]The dependencies for the ls command.type-enumThe type of the command.inputs-[str]The inputs for the command.working_directory-strThe working directory for the command.expect-enumSuccess | Failure
mkdir()
def mkdir(name, path, options, deps, type, inputs, working_directory, expect)Create a new directory.
Args
name- The name of the rule.path- The source file or directory.options- The options for the copy command.deps- The dependencies for the copy command.type- The type of the command.inputs- The inputs for the command.working_directory- The working directory for the command.expect-enumSuccess | Failure
mv()
def mv(name, source, destination, options, deps, type, inputs, working_directory, expect)Rename a file or directory from source to destination.
Args
name- The name of the rule.source-strThe source file or directory.destination-strThe destination file or directory.options-[str]The options for the move command.deps-[str]The dependencies for the move command.type-enumThe type of the command.inputs-[str]The inputs for the command.working_directory-strThe working directory for the command.expect-enumSuccess | Failure
shell()
def shell(name, script, shell, options, expect, type, inputs, working_directory, deps)Add a run rule that executes a shell script.
Examples:
shell(
name = "echo",
script = "echo hello",
)shell(
name = "echo",
script = "ls some_file && rm some_file",
)Args
name-strname of the rulescript-strtext of the script to runshell-strshell to use (default isbash)options-[str]options to pass before script default is-cexpect-enumSuccess | Failuretype-enumOptional | All (default is Optional)inputs-[str]The inputs for the command.working_directory-strworking directory (default is workspace root)deps-[str]rule dependencies