Recursive Behaviour

Recursive behaviour operates by first searching the current repository for a dep-file (e.g. skart.toml). If one is discovered, look through the dependencies it lists for any of their own .toml file until none are discovered. Every repository containing the .toml is cloned to a temporary location and a given command is run on it. The command is executed in a bottom-to-top fashion, i.e. first on repositories that do not have any .toml files, and hence do not have relevant dependencies. The last will be the highest repository on the tree (except the current one where we executed the command from, see below). Once the command succeeds on a repository, it proceeds to the next sub-component to execute the command until it reaches the starting repository.

Currently, the command is not executed on the current repository, instead we execute make deps-update-release.

A specific use-case is to invoke the recursive behaviour to update repository dependencies and make sub-sequent patch releases of them. This can be achieved by invoking the make deps-patch-release command recursively.

To invoke the recursive behaviour, you need to first make sure ska-rt is installed. The command to execute:

$ skart [options] invoke-recursive [--] [<command>...]

As options, you can give the path to the .toml file using –dep-file To set the mode to release you need use –mode as option and finally the command to run, by default it is set to make deps-patch-release.

You may invoke the recursive behaviour on a specific branch of the repositories by specifying the --branch option. If the branch does not yet exist on a repository, then the master/main branches will be cloned instead.

For example:

$ skart invoke-recursive --dep-file skart.toml --mode release -- make deps-patch-release

More details of various options can be found by running:

$ skart invoke-recursive --help