Loading generateChangemarks/.gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -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 - | export SPEC_NAME=$(ls | grep T*.md | cut -d'.' -f1) export SPEC_NAME=$(ls | grep -E "(TS|TR|WI).*\.md" | cut -d'.' -f1) script: - echo 'Publishing spec' - ./publish_spec.sh ${CI_PROJECT_URL} ${CI_COMMIT_TAG} onem2m_spec_template.docx $SPEC_NAME Loading Loading @@ -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 - | 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 - chmod +x spec_on_pages.sh Loading publish_spec.sh +5 −3 Original line number Diff line number Diff line Loading @@ -34,8 +34,10 @@ done for i in *.md ; do if [ $i != 'README.md' ]; then if [[ $i =~ '(TS|TR).*\.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" fi 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 --------" Loading spec_on_pages.sh +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ git checkout $7 ####### GENERATE NAV SPEC ####### echo "------ Generate input for mkdocs --------" python3 $1 -it -ihp --title ${9^^} "./$8.md" ls ${9^^} echo "------ Move to docs folder --------" mv ${9^^}/* docs/ sed -i 's/'${9^^}'\///g' _nav.yml Loading Loading
generateChangemarks/.gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -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 - | export SPEC_NAME=$(ls | grep T*.md | cut -d'.' -f1) export SPEC_NAME=$(ls | grep -E "(TS|TR|WI).*\.md" | cut -d'.' -f1) script: - echo 'Publishing spec' - ./publish_spec.sh ${CI_PROJECT_URL} ${CI_COMMIT_TAG} onem2m_spec_template.docx $SPEC_NAME Loading Loading @@ -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 - | 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 - chmod +x spec_on_pages.sh Loading
publish_spec.sh +5 −3 Original line number Diff line number Diff line Loading @@ -34,8 +34,10 @@ done for i in *.md ; do if [ $i != 'README.md' ]; then if [[ $i =~ '(TS|TR).*\.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" fi 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 --------" Loading
spec_on_pages.sh +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ git checkout $7 ####### GENERATE NAV SPEC ####### echo "------ Generate input for mkdocs --------" python3 $1 -it -ihp --title ${9^^} "./$8.md" ls ${9^^} echo "------ Move to docs folder --------" mv ${9^^}/* docs/ sed -i 's/'${9^^}'\///g' _nav.yml Loading