summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThomas Kulik <thomas.kulik@telekom.de>2021-03-31 14:53:19 +0200
committerThomas Kulik <thomas.kulik@telekom.de>2021-03-31 15:01:01 +0200
commit56180a5ab013ca96c0931e321ddad87a2689b33d (patch)
treed6ed53cd6aaa8ab4a1544194229c5ccdaf259ccd /tools
parent8a510973bd0758a43194d6d14d73ad21add116fb (diff)
Issue-ID: DOC-730
update checkdocs.sh to recognize multiple tox.ini Signed-off-by: Thomas Kulik <thomas.kulik@telekom.de> Change-Id: I317133a71f1338215985a1157e37d1048f8c5129
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkdocs.sh35
1 files changed, 27 insertions, 8 deletions
diff --git a/tools/checkdocs.sh b/tools/checkdocs.sh
index 802472b9f..4a798b378 100755
--- a/tools/checkdocs.sh
+++ b/tools/checkdocs.sh
@@ -19,7 +19,7 @@
### checkdocs.sh
###
### AUTHOR(S):
-### Thomas Kulik, Deutsche Telekom AG, 2020
+### Thomas Kulik, Deutsche Telekom AG, 2020 - 2021
###
### DESCRIPTION:
### Retrieves a full list of ONAP repos from gerrit inluding their state.
@@ -46,7 +46,7 @@
### create repo list
### curl -s https://git.onap.org/ | grep "^<tr><td class='toplevel-repo'><a title='" | sed -r "s:^<tr><td class='toplevel-repo'><a title='::" | sed -r "s:'.*::"
###
-### remove branchname from the line
+### remove branchname from the line:
### cat frankfurt_repoclone.log | sed 's:frankfurt|::'
###
### list only image names
@@ -58,7 +58,7 @@
### SHORT: curl -s 'https://gerrit.onap.org/r/projects/?d' | awk '{if(NR>1)print}' | jq -c '.[] | {id, state}' | sed -r 's:%2F:/:g; s:["{}]::g; s:id\:::; s:,state\::|:; /All-Projects/d; /All-Users/d'
###
-script_version="1.5 (2021/03/29)"
+script_version="1.6 (2021/03/30)"
# save command for the restart with logging enabled
command=$0
@@ -523,7 +523,7 @@ do
#
# columns are filled with values from requested branch.
# if data is not available values from master branch are used.
- # to identify master branch values, data is put into brackets "(...)"
+ # to identify master branch values, data is put into round brackets "(...)"
#
readarray -t array < ./${repolist};
@@ -554,12 +554,31 @@ do
docs="${docs},-"
fi
- # tox.ini
- if [ -f ./${line}/docs/tox.ini ] ; then
+ # tox.ini (check docs dir and also check project root dir)
+ if [ -f ./${line}/docs/tox.ini ] || [ -f ./${line}/tox.ini ]; then
docs="${docs},tox.ini"
- elif [ -f ../master/${line}/docs/tox.ini ] ; then
- docs="${docs},(tox.ini)"
+ # tox.ini @ branch/docs dir
+ if [ -f ./${line}/docs/tox.ini ] ; then
+ docs="${docs} @docs"
+ fi
+ # tox.ini @ branch/project root dir
+ if [ -f ./${line}/tox.ini ] ; then
+ docs="${docs} @root"
+ fi
+ elif [ -f ../master/${line}/docs/tox.ini ] || [ -f ../master/${line}/tox.ini ]; then
+ docs="${docs},(tox.ini"
+ # tox.ini @ master/docs dir
+ if [ -f ../master/${line}/docs/tox.ini ] ; then
+ docs="${docs} @docs"
+ fi
+ # tox.ini @ master/project root dir
+ if [ -f ../master/${line}/tox.ini ] ; then
+ docs="${docs} @root"
+ fi
+ # just add a round bracket at the end of the value
+ docs="${docs})"
else
+ # no tox.ini found in docs or root dir
docs="${docs},-"
fi