Skip to main content

spawn

spawn - Run system commands on a selection of projects.

Description​

Run system commands on a selection of projects (or at the workspace root) and report the results.

For each selected project, the command will be launched at its corresponding root directory. If no project selection option such as --projects or --all is provided, the workspace-level default project selector will be used. If you use the --workspace option, then the command will be launched at the workspace root directory.

The command will return a non-zero status code if any of the commands fails. Command failure means that a problem occured while spawning the process (configuration problem, IO error, system errors etc...) or that a non-zero exit code was returned by the command after it was terminated, also it could mean that the command was interrupted by a termination signal.

Synopsis​

spawn [-p / --projects <PROJECTS>] [-s / --selector <SELECTOR>] [-a / --all ] [--include <INCLUDE>...] [--exclude <EXCLUDE>...] [--tags <TAGS>] [--parallelism <PARALLELISM>] [-w / --workspace ] [-k / --shell-kind <SHELL_KIND>] [-s / --shell <SHELL>] [-q / --quiet ] <COMMAND>...

Options​

  • [-p / --projects <PROJECTS>] : A list of project names. Will be parsed as a comma-separated list of project names (for e.g project1,project2,project3).
  • [-s / --selector <SELECTOR>] : A named selector to use when selecting projects. It must be declared at the workspace level.
  • [-a / --all ] : Select all projects in the workspace.
  • [--include <INCLUDE>...] : A pattern to use for including projects. You can pass this option multiple times if you want to use more than one inclusion pattern. Each pattern must be a valid regular expression. If you want to exclude some projects, you can use the --exclude option.
  • [--exclude <EXCLUDE>...] : A pattern to use for excluding projects that were selected using the --include option. You can pass this option multiple times if you want to use more than one exclusion pattern. Each pattern must a valid regular expression.
  • [--tags <TAGS>] : Tags to use when selecting projects. All projects that have at least one tag corresponding to one of the provided tags will be selected. You can pass multiple tags delimited by commas (for example, tag1,tag2,tag3).
  • [--parallelism <PARALLELISM>] : The level of parallelism to use when spawning a command across multiple projects. You can pass a number to indicate the maximum number of jobs running at the same time. "All" will set the maximum number of executions to the number of logical cores on your system."Infinite" will run every jobs in parallel without any max limit."None" can be used to totally disable parallelism and run jobs sequentially.
  • [-w / --workspace ] : Run the command only once, at the workspace root directory.
  • [-k / --shell-kind <SHELL_KIND>] : The shell kind to use. You can use this option if Blaze cannot infer what kind of shell is provided through the -s (or --shell) option. If no -s (or --shell) option is provided, then this option will be ignored.
  • [-s / --shell <SHELL>] : The shell program to use. A shell will always be used when spawning the command on each selected project. If you want to use a different shell than the default one, you can pass a --shell, or -s option.
  • [-q / --quiet ] : Disable command output.

Arguments​

  • <COMMAND>... : The system command to run. This command will be executed at the root folder of each project, or at the workspace root if you use the --workspace option.

Subcommands​

No subcommands for this command.