[ ] Create branch labelled v[version]-rc, for example, v1.5.2-rc (the "rc" stands for "Release Candidate").
[ ] Change the DESCRIPTION and NEWS on this branch to change the version number to the desired version for CRAN, e.g. from 1.5.1.9008 to 1.5.2.
[ ] Commit and push to the RC branch.
[ ] Clean your package directory to remove any extraneous files, including ones that are git-ignored. (Warning, this will delete any unsaved buffers in RStudio! Also, be sure to close RStudio before taking this step!) git clean -xdf .
NOTE: git clean -xdn . provides a "dry-run" list of what will be done / removed
[ ] Build your package. I personally do it from the Mac command line like this:
PATH=$PATH:/Applications/RStudio.app/Contents/MacOS/pandoc R CMD build [pkgdir]
on RStudio Cloud / RSP
PATH=$PATH:/usr/lib/rstudio-server/bin/pandoc/pandoc R CMD build [pkgdir]
- [ ] Do a sanity check by installing/testing the built package.
- [ ] Perform revdep check using https://github.com/r-lib/revdepcheck, if this is not the initial CRAN release.
- [ ] Run the following both locally and on [win-builder](https://win-builder.r-project.org/upload.aspx). You can also use https://r-hub.github.io/rhub/.
PATH=$PATH:/Applications/RStudio.app/Contents/MacOS/pandoc R CMD check --as-cran pkg_version.tar.gz
on RStudio Cloud / RSP
PATH=$PATH:/usr/lib/rstudio-server/bin/pandoc/pandoc R CMD check --as-cran pkg_version.tar.gz
- [ ] I don't know how much it matters but I have this file as my ~/.R/Makevars:
- [ ] Read every bullet point in the CRAN Policies document if this is the first release of the package. I usually print it out and check off the items one by one.
- [ ] [Submit to CRAN via their online form](https://cran.r-project.org/submit.html).
- [ ] If there are R CMD check warnings that are unavoidable, make sure to explain them in the comments.
- [ ] If rejected, make changes on the RC branch and bump the fourth (patch) version component, i.e. 1.5.2.1.
- [ ] When accepted, tag the RC branch with a v1.5.2.1 tag (or whatever version you finally ended up getting accepted), and push the tag to origin.
- [ ] Merge RC into master.
- [ ] On master, change the package version to 1.5.2.9000.
Related to #142
git clean -xdf .
git clean -xdn .
provides a "dry-run" list of what will be done / removedon RStudio Cloud / RSP
PATH=$PATH:/usr/lib/rstudio-server/bin/pandoc/pandoc R CMD build [pkgdir]
PATH=$PATH:/Applications/RStudio.app/Contents/MacOS/pandoc R CMD check --as-cran pkg_version.tar.gz
on RStudio Cloud / RSP
PATH=$PATH:/usr/lib/rstudio-server/bin/pandoc/pandoc R CMD check --as-cran pkg_version.tar.gz
CFLAGS += -Wall -pipe -pedantic -std=gnu99 -g -O0 CXXFLAGS += -Wall -pipe -Wno-unused -pedantic -g -O0 CXX11FLAGS += -Wall -pipe -Wno-unused -pedantic -g -O0