-
Notifications
You must be signed in to change notification settings - Fork 27
Preparing a new CRAN Release
This page collects guidelines for preparation of package release.
-
Check all the remote branches and contacted corresponding contributors to see if their work are ready to merge. For those who are not ready to incorporate their work in the next release. It is recommended to rebase (
git rebase) their current work after next version ofrefundis released. -
Always perform the first round of merges with
\develbranch.\masterbranch should only merged with\develbranch. Therefore, at least two checks (R CMD check) should be performed -- one for newly merged\develbranch and the other for newly merged\masterbranch. -
Currently, the unit test is only performed in
\develbranch to accelerate the checking process for\masterbranch. So be careful when rebase the\develbranch with\masterbranch and make sure the unit test related files are not lost during the merging process. -
The new updates should be properly documented in
NEWS.mdin the\masterbranch.
-
It is always a good idea to check the package with the latest development version, R-devel. It’s painful to manage multiple R versions, especially since you’ll need to reinstall all the packages. Instead, you can run
R CMD checkon CRAN’s servers withdevtools::build_win(). This builds your package and submits it to the CRAN win-builder. 10-20 minutes after submission, you’ll receive an e-mail telling you the check results. -
Check the package in different platform. Linux is automatically tested through TravisCI. Windows can be handled by
devtools::build_win(). -
You must fix all
ERRORsandWARNINGs. A package that contains any errors or warnings will not be accepted by CRAN. I also findNOTEsare also unacceptable in most cases so try to eliminate as manyNOTEsas possible. After the checks are done and passed, documentcran-comments.mdproperly in master branch. -
If you see any
ERRORs,WARNINGsandNOTEs, you can open a Github issue tracker and assign corresponding authors to resolve the issue.
-
The most easy way is to use
devtools::release(). It will build the package and performR CMD checkone last time. Then it will ask your a few question and upload the package for you. After that, you should receive an email notifying you of the submission and asking you to approve it. -
After the new version is on CRAN, rebase the
\develbranch and ask all author to rebase their current working branch. Tag the release usinggit tag. Change the version number for both\masterbranch and\develbranch to prepare next release.