diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-21 17:48:04 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-09-24 11:38:47 +0100 |
commit | 9e3abbbe4a69b4ab1d743b0b2e7e24ff4ac45ac2 (patch) | |
tree | 543d357e34c6f64395d5e7afb7933e0f22a764ed | |
parent | 2b2a5452d9fecee6b6dceba5e1d308db0df77e56 (diff) |
Make sure Vagrantfile checks out git submodules.
Fixes #1197. Thanks to Dave Arter for helping out with this.
-rwxr-xr-x | Vagrantfile | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Vagrantfile b/Vagrantfile index cc6832f9a..4bb173874 100755 --- a/Vagrantfile +++ b/Vagrantfile @@ -29,6 +29,17 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provision :shell, :inline => <<-EOS # To prevent "dpkg-preconfigure: unable to re-open stdin: No such file or directory" warnings export DEBIAN_FRONTEND=noninteractive + # Make sure git submodules are checked out! + if [ ! -e fixmystreet/commonlib/.git ]; then + echo "Checking out submodules" + apt-get -qq install -y git >/dev/null + cd fixmystreet + git submodule --quiet update --init --recursive + cd commonlib + git config core.worktree "../../../commonlib" + echo "gitdir: ../.git/modules/commonlib" > .git + cd ../.. + fi # Fetch and run install script wget -O install-site.sh --no-verbose https://github.com/mysociety/commonlib/raw/master/bin/install-site.sh sh install-site.sh --dev fixmystreet vagrant 127.0.0.1.xip.io |