Skip to content
Snippets Groups Projects
Commit 8e08d282 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Filter out README file + publish a given spec when clearing up gitlab pages

parent 0a03d844
Branches
No related tags found
No related merge requests found
......@@ -31,6 +31,10 @@ if [ $4 == 'upgrade' ]; then
elif [ $6 == 'true' ]; then
echo 'Removing all web pages content...'
rm -r public/*;
mkdir -p "public/$4"
ls public/
cp -r -f "$7_$4.docx" public/$4
docker run --rm -v $(pwd):/tmp -w /tmp "$DOCKER_IMAGE" python3 $1 "$7_$4" "$4/$7_$4.docx" "$5"
elif [ $6 == 'false' ]; then
mkdir -p "public/$4"
ls public/
......
......@@ -28,12 +28,14 @@ if [ ! $specs ] ; then
fi
for i in *.md ; do
if [ $i != 'README.md' ]; then
echo "\n------ Adding TOC to spec --------"
docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" generateTOC --add-content "/tmp/$i"
echo "\n------ Preparaing spec --------"
docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" pandocFilter -o "/tmp/" "/tmp/$i"
echo "\n------ Publishing spec --------"
docker run --rm -v $(pwd):/data -u $(id -u):$(id -g) "$DOCKER_IMAGE" "/data/$i" -f markdown -t docx --reference-doc "/data/${3}" -o "${4}_${2}.docx"
fi
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment