Commit e5196825 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

doc.{py,sh} get coverage pages

parent 74af097f
......@@ -9,7 +9,6 @@ import requests
DOC = Path('/net/pongo/vol/vol_projects/partage_gepetto/Doc')
GITLAB = 'https://gepgitlab.laas.fr'
RAINBOARD = 'http://rainboard.laas.fr'
VERSION = '16.04'
INDEX = DOC / 'index.html'
HEAD = DOC / 'index.head.html'
......@@ -22,7 +21,7 @@ if __name__ == '__main__':
for project, namespace, branch in sorted(requests.get(f'{RAINBOARD}/doc').json()['ret']):
url = f'{GITLAB}/{namespace}/{project}/-/jobs/artifacts/{branch}/download'
path = DOC / namespace / project / branch
r = requests.get(url, {'job': f'robotpkg-{project}-{VERSION}-release'}, stream=True)
r = requests.get(url, {'job': 'doc-coverage'}, stream=True)
try:
z = ZipFile(BytesIO(r.content))
path.mkdir(parents=True, exist_ok=True)
......@@ -33,7 +32,14 @@ if __name__ == '__main__':
if path.exists():
with INDEX.open('a') as f:
link = path.relative_to(DOC)
print(f'<tr><td>{project}</td><td>{namespace}</td><td><a href="{link}">{branch}</a></td></tr>', file=f)
doxygen, coverage = link / 'doxygen-html', link / 'coverage'
print(f'<tr><td>{project}</td><td>{namespace}</td><td>{branch}</td><td>', file=f)
if (DOC / doxygen).is_dir():
print(f'<a href="{doxygen}">Doc</a>', file=f)
print('</td><td>', file=f)
if (DOC / coverage).is_dir():
print(f'<a href="{coverage}">Coverage</a>', file=f)
print('</td></tr>', file=f)
with INDEX.open('a') as f:
print('</table></body></html>', file=f)
......@@ -6,24 +6,5 @@ set -e
cd /net/pongo/vol/vol_projects/partage_gepetto/Doc
for namespace in *; do
[[ -d $namespace ]] || continue
pushd $namespace
for project in *; do
pushd $project
for branch in *; do
pushd $branch
for folder in html doxygen-html; do
[[ -d $folder ]] || continue
cp -r $folder/* .
rm -r $folder
done
popd
done
popd
done
popd
done
find . -type d -exec chmod 0775 {} \;
find . -type f -exec chmod 0664 {} \;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment