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

Preparation of spec before publishing

parent 4702387b
Branches
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
DOCKER_IMAGE=pandoc/core:3.0 DOCKER_IMAGE=pandoc/core:3.0
PANDOC_FILTER_DOCKER_IMAGE=pandocfilter:latest
echo "\n------ Checking for docker image --------" echo "\n------ Checking for docker image --------"
docker pull "$DOCKER_IMAGE" docker pull "$DOCKER_IMAGE"
...@@ -26,10 +27,11 @@ if [ ! $specs ] ; then ...@@ -26,10 +27,11 @@ if [ ! $specs ] ; then
fi fi
for i in *.md ; do for i in *.md ; do
echo "\n------ Preparaing spec --------"
docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$PANDOC_FILTER_DOCKER_IMAGE" pandocFilter -o "/tmp/" "/tmp/$i"
echo "\n------ Publishing spec --------" 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 "Spec-template.docx" -o "${PROJECT_NAME}_${2}.docx" docker run --rm -v $(pwd):/data -u $(id -u):$(id -g) "$DOCKER_IMAGE" "/data/$i" -f markdown -t docx --reference-doc "Spec-template.docx" -o "${PROJECT_NAME}_${2}.docx"
done done
echo "\n------ Publishing spec --------"
exit 0 exit 0
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment