How to run 'git submodule update' in Conan recipe
If you want to run git submodule update in your conanfile.py, you can simple add a self.run() command after the git clone command:
conan_git_clone.py
self.run("git clone https://github.com/conan-io/hello.git")
self.run("cd hello && git submodule update --init --recursive")Full example:
conan_git_full.py
self.run("git clone https://github.com/seznam/elasticlient.git -b version-0.2")
self.run("cd elasticlient && git submodule update --init --recursive")Note that you need to cd <directory> && git submodule update
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow