mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-11 23:25:00 -05:00
I'd prefer to do the doc check prior to the package check so that we can fail fast in light of trivial errors, but I worry about the side-effects of installing devtools and roxygen2 on our tests, so I'm punting those tasks until after our CMD check. It may be possible to parallelize this work adjacent to our package check (and only do it on one version of R rather than all three), but I haven't explored that yet. Failures in the `after_script`s don't fail the build, surprisingly. The `|| travis_terminate 1` accomplishes that. `travis_terminate` taken from https://github.com/travis-ci/travis-ci/issues/1574#issuecomment-164094347 `git clean` incantations found in https://issues.jenkins-ci.org/browse/JENKINS-31924
17 lines
666 B
Bash
Executable File
17 lines
666 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Generate package docs in the working directory
|
|
Rscript -e "devtools::document(roclets=c('rd', 'collate', 'namespace'))"
|
|
|
|
# This command will return a zero exit code if there are uncommitted changes
|
|
test -n "$(git status --porcelain)"
|
|
if [ $? -eq 0 ]
|
|
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
|