Merge "[docs] Limit git submodule recurse to depth 1"
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 25 Sep 2018 17:10:16 +0000 (17:10 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 25 Sep 2018 17:10:16 +0000 (17:10 +0000)
jjb/opnfvdocs/docs-rtd.yaml

index fc99bd3..bfb9d63 100644 (file)
           if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
               cd docs/submodules/$GERRIT_PROJECT
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
+              cd -
           else
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
           fi
+          if [ -d docs/subdmodules ]; then
+              for project in docs/submodules/*; do
+                  cd $project && git submodule deinit -f . && cd -
+              done
+          fi
       - shell: |
           sudo -H pip install virtualenv
           virtualenv $WORKSPACE/venv