Add support for repo.git submodule directories 73/10473/1
authorRich Bennett <rb2745@att.com>
Wed, 6 Sep 2017 03:25:23 +0000 (23:25 -0400)
committerRich Bennett <rb2745@att.com>
Wed, 6 Sep 2017 03:25:23 +0000 (23:25 -0400)
Some ONAP projects use a node in the repository path to represent both
hierarchy for lower level repositories and an actual respository.
To support this in the doc project submodules directory structure we will
append .git to every repository. For example, here are three directories
two of which represent repositories appc.git appc/deployment.git.

The doc-master-verify-rtd template has been modified to work with repo.git
naming when it exist and remain compatible repo naming until .git is added
to all repositories

Change-Id: I0b97fe71e129afaa400bef3385c4cc8d2d525c49
Issue-ID: DOC-33
Signed-off-by: Rich Bennett <rb2745@att.com>
jjb/doc/doc-templates-rtd.yaml

index c6bec58..884c370 100644 (file)
     builders:
       - shell: |
           if [ "$GERRIT_PROJECT" != "doc" ]; then
-              cd docs/submodules/$GERRIT_PROJECT
+              if [ -d docs/submodules/$GERRIT_PROJECT.git ]; then
+                  cd docs/submodules/$GERRIT_PROJECT.git
+              else
+                  cd docs/submodules/$GERRIT_PROJECT
+              fi
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
           else
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD