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

Commit

Permalink
Update 'Azure Pipelines' files
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartWheater committed Mar 8, 2019
1 parent c49ee35 commit 1190a4f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions checkDocumentationUpdated.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Check if the documentation in the man directory matches what should be in it
# based on what is in the headers of the R scripts.
echo "Starting documentation check."

# Concatenate all the files in the man dir into one long string and md5sum it.
orig_sum=$(find man -type f | sort -u | xargs cat | md5sum)

# Rebuild the documentation.
R -e "devtools::document()"

# Concatenate all the files in the man dir into one long string and md5sum it.
new_sum=$(find man -type f | sort -u | xargs cat | md5sum)

# echo $orig_sum
# echo $new_sum

if [ "$orig_sum" != "$new_sum" ]; then
echo "Your committed manual files (man/*.Rd) are out of sync with the documentation in the R files."
echo "Run roxygenise() locally then commit again."
exit 1
else
echo "Documentation up to date."
exit 0
fi

0 comments on commit 1190a4f

Please sign in to comment.