Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
templates
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tecnalia_robotics-public
templates
Merge requests
!41
Resolve "Add asciidoctor syntax check to CI tests"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "Add asciidoctor syntax check to CI tests"
17-add-asciidoctor-syntax-check-to-ci-tests-2
into
master
Overview
2
Commits
3
Pipelines
3
Changes
3
Merged
Resolve "Add asciidoctor syntax check to CI tests"
Jon Azpiazu
requested to merge
17-add-asciidoctor-syntax-check-to-ci-tests-2
into
master
Dec 3, 2019
Overview
2
Commits
3
Pipelines
3
Changes
3
Closes
#17 (closed)
Edited
Dec 3, 2019
by
Jon Azpiazu
0
0
Merge request reports
Compare
master
version 1
7bac8b8c
Dec 3, 2019
master (base)
and
version 1
latest version
68dc39c8
3 commits,
Dec 4, 2019
version 1
7bac8b8c
2 commits,
Dec 3, 2019
3 files
+
55
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
scripts/asciidoctor_syntax_check.bash
0 → 100644
+
21
−
0
View file @ 7bac8b8c
Edit in single-file editor
Open in Web IDE
#!/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
touch
output.log
# avoid failing if no adoc files exist
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
Loading