-
-
Save si9ma/2fc72c0707777e6cbb499394ed4c41c9 to your computer and use it in GitHub Desktop.
Automatically manipulate .gitmodules so Travis CI pulls submodules from public URL instead of SSH URL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# I use SSH URLs in my submodules for convenience. However, Travis CI is unable to | |
# clone from those URLs even though the repositories are public. To fix this, I'm | |
# simply manipulating the .gitmodules file with sed so it points to the public | |
# URLs before initializing the submodules. | |
# | |
# Hope it saves you some frustration! | |
# | |
# disable the default submodule logic | |
git: | |
submodules: false | |
# use sed to replace the SSH URL with the public URL, then init and update submodules | |
before_install: | |
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules | |
- git submodule update --init --recursive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment