Skip to content
Snippets Groups Projects
Select Git revision
  • 58c404ed1b45fe754d7b6cb6deb4c8ba5bca5f70
  • master default protected
  • 7
  • 7.10
  • 7.10.2
  • 7.10.1
  • 7.10.0
  • 7.9
  • 7.9.2
  • 7.9.1
  • 7.9.0
  • 7.8.3
  • 7.8.2
  • 7.8.1
  • 7.8
  • 7.8.0
  • 7.7
  • 7.7.1
  • 7.7.0
  • 7.6
  • 7.6.0
  • 7.5
22 results

gitlab-ci-python-vault.yml

Blame
  • asciidoctor_syntax_check.bash 612 B
    #!/bin/bash
    
    if ! [ -x "$(command -v asciidoctor)" ]; then
        echo "Error: asciidoctor is not installed"
        exit 1
    fi
    
    if [ -z "$1" ] ; then
        echo "Error: No argument supplied - path needed"
        exit 1
    fi
    
    while IFS= read -r -d '' filename; do
      asciidoctor "$filename" 2>&1 | tee -a output.log
    done < <(find "$1" -name '*.adoc' -type f -print0)
    adoc_errors=0 ; adoc_warnings=0
    adoc_errors=$(grep -c "ERROR" output.log)
    adoc_warnings=$(grep -c "WARNING" output.log)
    echo "AsciiDoc format Found ${adoc_errors} errors and ${adoc_warnings} warnings"
    if [ "${adoc_errors}" -eq 0 ]; then exit 0; else exit 1; fi