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
!39
WIP: Resolve "Add asciidoctor syntax check to CI tests"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Closed
WIP: Resolve "Add asciidoctor syntax check to CI tests"
17-add-asciidoctor-syntax-check-to-ci-tests
into
master
Overview
2
Commits
10
Pipelines
14
Changes
3
1 open thread
Hide all comments
Closed
WIP: Resolve "Add asciidoctor syntax check to CI tests"
Jon Azpiazu
requested to merge
17-add-asciidoctor-syntax-check-to-ci-tests
into
master
Dec 2, 2019
Overview
2
Commits
10
Pipelines
14
Changes
3
1 open thread
Hide all comments
Closes
#17 (closed)
0
0
Merge request reports
Viewing commit
56dc6b2a
Show latest version
3 files
+
50
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
56dc6b2a
Add script and job for asciidoctor
· 56dc6b2a
Jon Azpiazu
authored
Dec 2, 2019
scripts/asciidoctor_syntax_check.bash
0 → 100644
+
18
−
0
View file @ 56dc6b2a
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
for
foo
in
$(
find
"
$1
"
-name
'*.adoc'
)
;
do
asciidoctor
$foo
2>&1 |
tee
-a
output.log
;
done
adoc_errors
=
0
;
adoc_warnings
=
0
adoc_errors
=
$(
grep
"ERROR"
output.log |
wc
-l
)
adoc_warnings
=
$(
grep
"WARNING"
output.log |
wc
-l
)
echo
"AsciiDoc format Found
${
adoc_errors
}
errors and
${
adoc_warnings
}
warnings"
if
[
"
${
adoc_errors
}
"
-eq
0
]
;
then
exit
0
;
else
exit
1
;
fi
Loading