diff --git a/tools/checkDocsCurrent.sh b/tools/checkDocsCurrent.sh index 6d42068d1..1cc879db8 100755 --- a/tools/checkDocsCurrent.sh +++ b/tools/checkDocsCurrent.sh @@ -1,16 +1,11 @@ #!/bin/bash +set -e + # Generate package docs in the working directory Rscript -e "devtools::document(roclets=c('rd', 'collate', 'namespace'))" -if [ $? -ne 0 ] -then - echo "Error generating Roxygen docs." - exit 1 -fi -# This command will return a zero exit code if there are uncommitted changes -test -n "$(git status --porcelain)" -if [ $? -eq 0 ] +if [ -n "$(git status --porcelain)" ] then git status --porcelain echo "Please generate the Roxygen documentation and commit the updates." diff --git a/tools/checkJSCurrent.sh b/tools/checkJSCurrent.sh index 8acc82e9b..0f358ccc6 100755 --- a/tools/checkJSCurrent.sh +++ b/tools/checkJSCurrent.sh @@ -1,16 +1,11 @@ #!/bin/bash +set -e + # Run JS build process (cd "$(dirname "$0")" && yarn && yarn build) -if [ $? -ne 0 ] -then - echo "Error generating JavaScript assets with yarn." - exit 1 -fi -# This command will return a zero exit code if there are uncommitted changes -test -n "$(git status --porcelain)" -if [ $? -eq 0 ] +if [ -n "$(git status --porcelain)" ] then git status --porcelain echo "Please rebuild the JavaScript and commit the changes."