How to make formula resolve git submodules? #2100
-
I'm trying to write a formula that uses Git submodules to resolve dependencies. If I download a zip or tar.gz from GitHub, there's no What are my options here? The only thing I can think of is to maintain/upload my own archive of the repo with the submodules already there, and that seems unnecessarily inconvenient. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You can use a Git clone which automatically resolves submodules. You will need to specify both url "https://github.com/grpc/grpc.git",
tag: "v1.39.1",
revision: "2d6b8f61cfdd1c4d2d7c1aae65a4fbf00e3e0981"
version "1391" Note that Git clones are much slower and worse for caching than tarballs. |
Beta Was this translation helpful? Give feedback.
-
You can take a look at url "https://github.com/arduino/arduino-cli.git",
tag: "0.18.3",
revision: "d710b642ef7992a678053e9d68996c02f5863721" This is less preferable and more expensive compared to using a tarball (which can be cached), but a fair few formulae do use this approach. |
Beta Was this translation helpful? Give feedback.
-
Ah thanks, I didn't know the |
Beta Was this translation helpful? Give feedback.
You can use a Git clone which automatically resolves submodules. You will need to specify both
tag
andrevision
. If the version information isn't recovered correctly from the tag you can also specify theversion
in the formula manually. For example:Note that Git clones are much slower and worse for caching than tarballs.