Commit 5fe64a1f authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Adding support to work items

parent 3a462976
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -93,7 +93,7 @@ Publish spec:
    - |
    - |
     curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/Spec-template%2Edocx/raw?ref=master" >> onem2m_spec_template.docx
     curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/Spec-template%2Edocx/raw?ref=master" >> onem2m_spec_template.docx
    - |
    - |
     export SPEC_NAME=$(ls | grep T*.md | cut -d'.' -f1)
     export SPEC_NAME=$(ls | grep -E "(TS|TR|WI).*\.md" | cut -d'.' -f1)
  script:
  script:
    - echo 'Publishing spec'
    - echo 'Publishing spec'
    - ./publish_spec.sh ${CI_PROJECT_URL} ${CI_COMMIT_TAG} onem2m_spec_template.docx $SPEC_NAME
    - ./publish_spec.sh ${CI_PROJECT_URL} ${CI_COMMIT_TAG} onem2m_spec_template.docx $SPEC_NAME
@@ -168,7 +168,7 @@ pages:
    - |
    - |
     curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/toMkdocs%2FtoMkdocs%2Epy/raw?ref=master" >> toMkdocs.py
     curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/toMkdocs%2FtoMkdocs%2Epy/raw?ref=master" >> toMkdocs.py
    - |
    - |
     export SPEC_NAME=$(ls | grep T*.md | cut -d'.' -f1)
     export SPEC_NAME=$(ls | grep -E "(TS|TR|WI).*\.md" | cut -d'.' -f1)
    - |
    - |
     curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/spec_on_pages%2Esh/raw?ref=master" >> spec_on_pages.sh
     curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/spec_on_pages%2Esh/raw?ref=master" >> spec_on_pages.sh
    - chmod +x spec_on_pages.sh
    - chmod +x spec_on_pages.sh
+5 −3
Original line number Original line Diff line number Diff line
@@ -34,8 +34,10 @@ done


for i in *.md ;  do
for i in *.md ;  do
    if [ $i != 'README.md' ]; then
    if [ $i != 'README.md' ]; then
      if [[ $i =~ '(TS|TR).*\.md' ]] ; then
        echo "\n------ Adding TOC to spec --------"
        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"
	      docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" generateTOC --add-content "/tmp/$i"
	    fi
	    echo "\n------ Preparaing spec --------"
	    echo "\n------ Preparaing spec --------"
	    docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" pandocFilter -o "/tmp/" "/tmp/$i"
	    docker run --rm -v $(pwd):/tmp/ -u $(id -u):$(id -g) "$TOOLS_DOCKER_IMAGE" pandocFilter -o "/tmp/" "/tmp/$i"
	    echo "\n------ Publishing spec --------"
	    echo "\n------ Publishing spec --------"
+1 −0
Original line number Original line Diff line number Diff line
@@ -40,6 +40,7 @@ git checkout $7
####### GENERATE NAV SPEC #######
####### GENERATE NAV SPEC #######
echo "------ Generate input for mkdocs --------"
echo "------ Generate input for mkdocs --------"
python3 $1 -it -ihp --title ${9^^} "./$8.md"
python3 $1 -it -ihp --title ${9^^} "./$8.md"
ls ${9^^}
echo "------ Move to docs folder --------"
echo "------ Move to docs folder --------"
mv ${9^^}/* docs/
mv ${9^^}/* docs/
sed -i 's/'${9^^}'\///g' _nav.yml
sed -i 's/'${9^^}'\///g' _nav.yml