Skip to content
This repository was archived by the owner on Oct 22, 2019. It is now read-only.

Commit 1190a4f

Browse files
committed
Update 'Azure Pipelines' files
1 parent c49ee35 commit 1190a4f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

checkDocumentationUpdated.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
# Check if the documentation in the man directory matches what should be in it
3+
# based on what is in the headers of the R scripts.
4+
echo "Starting documentation check."
5+
6+
# Concatenate all the files in the man dir into one long string and md5sum it.
7+
orig_sum=$(find man -type f | sort -u | xargs cat | md5sum)
8+
9+
# Rebuild the documentation.
10+
R -e "devtools::document()"
11+
12+
# Concatenate all the files in the man dir into one long string and md5sum it.
13+
new_sum=$(find man -type f | sort -u | xargs cat | md5sum)
14+
15+
# echo $orig_sum
16+
# echo $new_sum
17+
18+
if [ "$orig_sum" != "$new_sum" ]; then
19+
echo "Your committed manual files (man/*.Rd) are out of sync with the documentation in the R files."
20+
echo "Run roxygenise() locally then commit again."
21+
exit 1
22+
else
23+
echo "Documentation up to date."
24+
exit 0
25+
fi

0 commit comments

Comments
 (0)