Loading generateChangemarks/.gitlab-ci.yml +4 −2 Original line number Diff line number Diff line Loading @@ -137,9 +137,10 @@ pages: PAGES_BRANCH: gl-pages HTTPS_REMOTE: https://gitlab-ci-token:${MIKE_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git TAG_NAME: "" TMPTAG: "none" rules: - if: ($CLEAN_WEB_PAGES == 'false' || $CLEAN_WEB_PAGES == 'true') && $CI_COMMIT_TAG - if: ($CLEAN_WEB_PAGES == 'false' || $CLEAN_WEB_PAGES == 'true') && $TMPTAG ## Replace this by CI_COMMIT_TAG when test finished variables: TAG_NAME: $CI_COMMIT_TAG - if: ($CLEAN_WEB_PAGES != "false" && $CLEAN_WEB_PAGES != "true") && $CI_PIPELINE_SOURCE == "web" Loading Loading @@ -197,7 +198,8 @@ pages: # - mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $TAG_NAME latest # - mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest # - git checkout $PAGES_BRANCH -- public/ - ./spec_on_pages.sh toMkdocs.py $MIKE_ACCESS_TOKEN $CI_SERVER_HOST $CI_PROJECT_PATH "$GITLAB_USER_NAME" $GITLAB_USER_EMAIL $CI_COMMIT_SHA $SPEC_NAME $CI_PROJECT_NAME $TAG_NAME # - ./spec_on_pages.sh toMkdocs.py $MIKE_ACCESS_TOKEN $CI_SERVER_HOST $CI_PROJECT_PATH "$GITLAB_USER_NAME" $GITLAB_USER_EMAIL $CI_COMMIT_SHA $SPEC_NAME $CI_PROJECT_NAME $TAG_NAME $CLEAN_WEB_PAGES - ./spec_on_pages.sh toMkdocs.py $MIKE_ACCESS_TOKEN $CI_SERVER_HOST $CI_PROJECT_PATH "$GITLAB_USER_NAME" $GITLAB_USER_EMAIL $CI_COMMIT_SHA $SPEC_NAME $CI_PROJECT_NAME $TMPTAG $CLEAN_WEB_PAGES artifacts: paths: - public/ Loading spec_on_pages.sh +28 −6 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ echo "SPEC_NAME:" $8 echo "CI_PROJECT_NAME:" $9 #$TAG_NAME ->10 echo "TAG_NAME:" ${10} #$CLEAN_WEB_PAGES ->11 echo "CLEAN_WEB_PAGES:" ${11} #BACKUP=false PAGES_BRANCH=gl-pages Loading @@ -33,7 +35,7 @@ pip install -q mkdocs-material mike rich mkdocs-rss-plugin echo "------ Get the previous GitLab Pages content --------" git config --global --replace-all user.name "$5" git config --global --replace-all user.email $6 git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet." git fetch origin $PAGES_BRANCH && git checkout -B $PAGES_BRANCH || git checkout -B $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet." git checkout $7 echo "------ Process published baselines --------" Loading Loading @@ -82,13 +84,33 @@ echo "------ Move to docs folder --------" mv ${9^^}/ docs/ cat _nav.yml >> mkdocs.yml ## Create download tab if official baseline version if [[ ${10} == v* ]]; then echo "Adding download tab for version ${10}..." mkdir -p "docs/download" mv "$8_${10}.docx" docs/download sed -i 's/PROJECT/'${9^^}'/g' index.md sed -i 's/SPEC/'"$8_${10}.docx"'/g' index.md sed -i 's/VERSION/'${10}'/g' index.md mv index.md docs/download echo " - Download: 'download/index.md'" >> mkdocs.yml else rm docs/index.md fi echo "------ Generating site --------" if [[ ${11} =~ miguel[0-9]* ]]; then ##change to ^v* when testing finished echo "Removing docs version ${11}..." mike list mike delete latest --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH mike delete --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH ${11} else echo "Generating docs version ${10}..." mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} latest mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest git checkout $PAGES_BRANCH -- public/ fi git checkout -f $PAGES_BRANCH -- public/ ls public/ exit 0 toMkdocs/index.md +4 −1 Original line number Diff line number Diff line # Welcome to oneM2M Specifications  toMkdocs/toMkdocs.py +13 −14 Original line number Diff line number Diff line Loading @@ -336,8 +336,7 @@ def updateNotes(clauses:list[Clause]) -> list[Clause]: lines:list[Line] = [] inNote = False for line in clause.lines: match line.lineType: case LineType.NOTE: if line.lineType == LineType.NOTE: if not inNote: lines.append(Line('\n', LineType.TEXT)) lines.append(Line('!!! note\n', LineType.NOTE)) Loading @@ -345,7 +344,7 @@ def updateNotes(clauses:list[Clause]) -> list[Clause]: lines.append(Line(f"\t{re.sub(_matchNoteStart, '', line.text)}", LineType.NOTE)) if verbose: print(f'[dim]Converted note in clause "{clause.title}"') case _: else: if inNote: lines.append(Line('\n', LineType.TEXT)) inNote = False Loading Loading
generateChangemarks/.gitlab-ci.yml +4 −2 Original line number Diff line number Diff line Loading @@ -137,9 +137,10 @@ pages: PAGES_BRANCH: gl-pages HTTPS_REMOTE: https://gitlab-ci-token:${MIKE_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git TAG_NAME: "" TMPTAG: "none" rules: - if: ($CLEAN_WEB_PAGES == 'false' || $CLEAN_WEB_PAGES == 'true') && $CI_COMMIT_TAG - if: ($CLEAN_WEB_PAGES == 'false' || $CLEAN_WEB_PAGES == 'true') && $TMPTAG ## Replace this by CI_COMMIT_TAG when test finished variables: TAG_NAME: $CI_COMMIT_TAG - if: ($CLEAN_WEB_PAGES != "false" && $CLEAN_WEB_PAGES != "true") && $CI_PIPELINE_SOURCE == "web" Loading Loading @@ -197,7 +198,8 @@ pages: # - mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $TAG_NAME latest # - mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest # - git checkout $PAGES_BRANCH -- public/ - ./spec_on_pages.sh toMkdocs.py $MIKE_ACCESS_TOKEN $CI_SERVER_HOST $CI_PROJECT_PATH "$GITLAB_USER_NAME" $GITLAB_USER_EMAIL $CI_COMMIT_SHA $SPEC_NAME $CI_PROJECT_NAME $TAG_NAME # - ./spec_on_pages.sh toMkdocs.py $MIKE_ACCESS_TOKEN $CI_SERVER_HOST $CI_PROJECT_PATH "$GITLAB_USER_NAME" $GITLAB_USER_EMAIL $CI_COMMIT_SHA $SPEC_NAME $CI_PROJECT_NAME $TAG_NAME $CLEAN_WEB_PAGES - ./spec_on_pages.sh toMkdocs.py $MIKE_ACCESS_TOKEN $CI_SERVER_HOST $CI_PROJECT_PATH "$GITLAB_USER_NAME" $GITLAB_USER_EMAIL $CI_COMMIT_SHA $SPEC_NAME $CI_PROJECT_NAME $TMPTAG $CLEAN_WEB_PAGES artifacts: paths: - public/ Loading
spec_on_pages.sh +28 −6 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ echo "SPEC_NAME:" $8 echo "CI_PROJECT_NAME:" $9 #$TAG_NAME ->10 echo "TAG_NAME:" ${10} #$CLEAN_WEB_PAGES ->11 echo "CLEAN_WEB_PAGES:" ${11} #BACKUP=false PAGES_BRANCH=gl-pages Loading @@ -33,7 +35,7 @@ pip install -q mkdocs-material mike rich mkdocs-rss-plugin echo "------ Get the previous GitLab Pages content --------" git config --global --replace-all user.name "$5" git config --global --replace-all user.email $6 git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet." git fetch origin $PAGES_BRANCH && git checkout -B $PAGES_BRANCH || git checkout -B $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet." git checkout $7 echo "------ Process published baselines --------" Loading Loading @@ -82,13 +84,33 @@ echo "------ Move to docs folder --------" mv ${9^^}/ docs/ cat _nav.yml >> mkdocs.yml ## Create download tab if official baseline version if [[ ${10} == v* ]]; then echo "Adding download tab for version ${10}..." mkdir -p "docs/download" mv "$8_${10}.docx" docs/download sed -i 's/PROJECT/'${9^^}'/g' index.md sed -i 's/SPEC/'"$8_${10}.docx"'/g' index.md sed -i 's/VERSION/'${10}'/g' index.md mv index.md docs/download echo " - Download: 'download/index.md'" >> mkdocs.yml else rm docs/index.md fi echo "------ Generating site --------" if [[ ${11} =~ miguel[0-9]* ]]; then ##change to ^v* when testing finished echo "Removing docs version ${11}..." mike list mike delete latest --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH mike delete --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH ${11} else echo "Generating docs version ${10}..." mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} latest mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest git checkout $PAGES_BRANCH -- public/ fi git checkout -f $PAGES_BRANCH -- public/ ls public/ exit 0
toMkdocs/index.md +4 −1 Original line number Diff line number Diff line # Welcome to oneM2M Specifications 
toMkdocs/toMkdocs.py +13 −14 Original line number Diff line number Diff line Loading @@ -336,8 +336,7 @@ def updateNotes(clauses:list[Clause]) -> list[Clause]: lines:list[Line] = [] inNote = False for line in clause.lines: match line.lineType: case LineType.NOTE: if line.lineType == LineType.NOTE: if not inNote: lines.append(Line('\n', LineType.TEXT)) lines.append(Line('!!! note\n', LineType.NOTE)) Loading @@ -345,7 +344,7 @@ def updateNotes(clauses:list[Clause]) -> list[Clause]: lines.append(Line(f"\t{re.sub(_matchNoteStart, '', line.text)}", LineType.NOTE)) if verbose: print(f'[dim]Converted note in clause "{clause.title}"') case _: else: if inNote: lines.append(Line('\n', LineType.TEXT)) inNote = False Loading