diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-04-08 20:42:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-08 20:42:03 +0300 |
commit | 93f756ec252fee895569750caa2a956b957596cf (patch) | |
tree | 3b4fbb4107e7793d943b6c65820d376fea150ff7 /docs/markdown | |
parent | 2946eb4404a5351f0dc6eb47c05a80d0ef04acd6 (diff) | |
parent | 221fb86373ee3b49fd56732fca0286d8ed80eaac (diff) | |
download | meson-93f756ec252fee895569750caa2a956b957596cf.zip meson-93f756ec252fee895569750caa2a956b957596cf.tar.gz meson-93f756ec252fee895569750caa2a956b957596cf.tar.bz2 |
Merge pull request #5176 from ao2/add-subproject-foreach-command
Add 'meson subprojects foreach' command
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Subprojects.md | 11 | ||||
-rw-r--r-- | docs/markdown/snippets/subproject-foreach.md | 7 |
2 files changed, 17 insertions, 1 deletions
diff --git a/docs/markdown/Subprojects.md b/docs/markdown/Subprojects.md index 24b8af6..2546441 100644 --- a/docs/markdown/Subprojects.md +++ b/docs/markdown/Subprojects.md @@ -235,12 +235,21 @@ To pull latest version of all your subprojects at once, just run the command: The command-line `meson subprojects checkout <branch_name>` will checkout a branch, or create one with `-b` argument, in every git subprojects. This is useful when starting local changes across multiple subprojects. It is still your -responsability to commit and push in each repository where you made local +responsibility to commit and push in each repository where you made local changes. To come back to the revision set in wrap file (i.e. master), just run `meson subprojects checkout` with no branch name. +## Execute a command on all subprojects + +*Since 0.51.0* + +The command-line `meson subprojects foreach <command> [...]` will +execute a command in each subproject directory. For example this can be useful +to check the status of subprojects (e.g. with `git status` or `git diff`) before +performing other actions on them. + ## Why must all subprojects be inside a single directory? There are several reasons. diff --git a/docs/markdown/snippets/subproject-foreach.md b/docs/markdown/snippets/subproject-foreach.md new file mode 100644 index 0000000..3a8ffc4 --- /dev/null +++ b/docs/markdown/snippets/subproject-foreach.md @@ -0,0 +1,7 @@ +## Add new `meson subprojects foreach` command + +`meson subprojects` has learned a new `foreach` command which accepts a command +with arguments and executes it in each subproject directory. + +For example this can be useful to check the status of subprojects (e.g. with +`git status` or `git diff`) before performing other actions on them. |