diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-01-24 17:19:38 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-01-27 10:44:08 +0100 |
commit | 89b1d7f86c73f88c59e9c17c5acffe8bc12cfaa9 (patch) | |
tree | 06bb267ab276cd67565635e384d1ac50be8cf965 /coin | |
parent | 499f6e2fe5906eaa6be63ff47ef4ae6f19f88b62 (diff) |
CMake: Add support for a git qt-foreach subcommand for worktrees
Developers that use a top-level qt5.git can use git submodule foreach
to run commands for each submodule. That is not available to
developers that maintain their own non-submodule based top-level
checkout using git worktrees.
Extend the QtSynchronizeRepo.cmake script that allows to sync
submodules / worktrees to also allow running foreach commands.
The CMake invocation to run a foreach would look like
cmake -DQT_FOREACH=TRUE "-DARGS=git pull -r" -P
cmake/QtSynchronizeRepo.cmake
But it's nicer to create a git-qt-foreach script in
/usr/local/bin/git-qt-foreach with the following contents
cmake -DQT_FOREACH=TRUE "-DARGS=$*" -P cmake/QtSynchronizeRepo.cmake
Make sure to chmod a+x it and invoke like
git qt-foreach git pull -r
Change-Id: I0ccd67facbfe702c6a872165cdfd9f9e6eae9043
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'coin')
0 files changed, 0 insertions, 0 deletions