[Genabel-commits] r1823 - pkg/GenABEL-general/distrib_scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Sep 11 14:56:05 CEST 2014
Author: lckarssen
Date: 2014-09-11 14:56:05 +0200 (Thu, 11 Sep 2014)
New Revision: 1823
Modified:
pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh
Log:
Changed the way R checks are run in the makedistrib scripts. Before, the --as-cran checks were run on the package directory, but according to the Writing R Extensions manual, these checks should be run on the tar.gz file created by R CMD build.
This also solves the warning when building DatABEL:
* checking package vignettes in ?\226?\128?\152inst/doc?\226?\128?\153 ... WARNING
Package vignette without corresponding PDF/HTML:
?\226?\128?\152intro_DatABEL.Rnw?\226?\128?\153
Also, with this change the uses is warned at the end of the script when he specified the -c (--nocrancheck) option. Just to be sure that the correct checks are indeed performed before uploading to CRAN.
Modified: pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh
===================================================================
--- pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh 2014-09-11 09:24:03 UTC (rev 1822)
+++ pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh 2014-09-11 12:56:05 UTC (rev 1823)
@@ -46,49 +46,52 @@
# Run the various checks and builds
#######################################################################
run_checks_build () {
- errwarn=0
echo
echo "--------------------------------------------------"
- echo "Running normal R checks..."
+ echo "Running normal R checks on package directory..."
echo "--------------------------------------------------"
$RCMD check $PKG
if grep -qE "NOTE|WARNING|ERROR" $PKG.Rcheck/00check.log; then
- errwarn=1
+ echo
+ echo "NOTEs, WARNINGs or ERRORs found!" 1>&2
+ echo "Please fix!" 1>&2
fi
+ echo
+ echo "--------------------------------------------------"
+ echo "Building the package for distribution..."
+ echo "--------------------------------------------------"
+ $RCMD build $PKG
+
if [ $CRANCHECK == true ]; then
echo
echo "--------------------------------------------------"
- echo "Check with --as-cran..."
+ echo "Check package tar-ball with --as-cran..."
echo "--------------------------------------------------"
- # Remove (shared) object files that were left over from
- # running `R CMD check`
- rm -rf $PKG/src/*.o
- rm -rf $PKG/src/*.so
+ PKG_VERSION=$(grep Version: ${PKG}/DESCRIPTION | cut -d " " -f2)
- R CMD check --as-cran $PKG
+ R CMD check --as-cran ${PKG}_${PKG_VERSION}.tar.gz
if sed -e 's/feasibility ... WARNING/feasibility ... WRNNG/' \
-e 's/^WARNING/WRNNG/' $PKG.Rcheck/00check.log | \
grep -qE "NOTE|WARNING|ERROR"; then
errwarn=1
fi
- fi
- echo
- echo "--------------------------------------------------"
- echo "Building the package for distribution..."
- echo "--------------------------------------------------"
- $RCMD build $PKG
-
- if [ $errwarn -eq 1 ]; then
- echo
- echo "NOTEs, WARNINGs or ERRORs found!" 1>&2
- echo "Please fix before uploading to CRAN" 1>&2
- exit 1
+ errwarn=0
+ if [ $errwarn -eq 1 ]; then
+ echo
+ echo "NOTEs, WARNINGs or ERRORs found!" 1>&2
+ echo "Please fix before uploading to CRAN" 1>&2
+ exit 1
+ else
+ echo
+ echo "Successfully checked and built the $PKG package."
+ echo -n "Don't forget to increase the package version number "
+ echo "if you haven't already done so."
+ fi
else
echo
- echo "Successfully checked and built the $PKG package."
- echo -n "Don't forget to increase the package version number "
- echo "if you haven't already done so."
+ echo "You didn't run the as-cran checks!" 1>&2
+ echo "Please do so before uploading the package to CRAN" 1>&2
fi
}
More information about the Genabel-commits
mailing list