Run user defined command
mbt run-in branch [name] [--content] [--name <name>] [--fuzzy]
Run user defined command in modules in a branch. Assume master if branch name is not specified.
Consider just the modules matching the --name
filter if specified.
Default --name
filter is a prefix match. You can change this to a subsequence
match by using --fuzzy
option.
mbt run-in commit <commit> [--content] [--name <name>] [--fuzzy]
Run user defined command in modules in a commit. Full commit sha is required.
Consider just the modules modified in the commit when --content
flag is used.
Consider just the modules matching the --name
filter if specified.
Default --name
filter is a prefix match. You can change this to a subsequence
match by using --fuzzy
option.
mbt run-in diff --from <commit> --to <commit>
Run user defined command in modules changed between from
and to
commits.
In this mode, mbt works out the merge base between from
and to
and
evaluates the modules changed between the merge base and to
.
mbt run-in head [--content] [--name <name>] [--fuzzy]
Run user defined command in modules in current head.
Consider just the modules matching the --name
filter if specified.
Default --name
filter is a prefix match. You can change this to a subsequence
match by using --fuzzy
option.
mbt run-in pr --src <name> --dst <name>
Run user defined command in modules changed between --src
and --dst
branches.
In this mode, mbt works out the merge base between --src
and --dst
and
evaluates the modules changed between the merge base and --src
.
mbt run-in local [--all] [--content] [--name <name>] [--fuzzy]
Run user defined command in modules modified in current workspace. All modules in the workspace are
considered if --all
option is specified.
Consider just the modules matching the --name
filter if specified.
Default --name
filter is a prefix match. You can change this to a subsequence
match by using --fuzzy
option.
When executing a command, following environment variables are initialised and can be used by the command being executed.
MBT_MODULE_NAME
Name of the module
MBT_MODULE_VERSION
Module version
MBT_BUILD_COMMIT
Git commit SHA of the commit being built
In addition to the variables listed above, module properties are also populated
in the form of MBT_MODULE_PROPERTY_XXX
where XXX
denotes the key.
-m, --command string Command to execute
--fail-fast Fail fast on command failure
-h, --help help for run-in
--debug Enable debug output
--in string Path to repo