Files
shiny/tools/checkDocsCurrent.sh
trestletech 67cdcedd4e Better bash
2019-06-19 11:04:39 -05:00

17 lines
583 B
Bash
Executable File

#!/bin/bash
set -e
# Generate package docs in the working directory
Rscript -e "devtools::document(roclets=c('rd', 'collate', 'namespace'))"
if [ -n "$(git status --porcelain)" ]
then
git status --porcelain
echo "Please generate the Roxygen documentation and commit the updates."
echo "The above files changed when we generated the Roxygen documentation. This most often occurs when a user changes the Roxygen documentation in an R file but doesn't regenerate the documentation before committing."
exit 1
else
echo "No difference detected; Roxygen docs are current."
fi