Skip to content

Cutting a new release

Aaron Clark edited this page Jun 26, 2024 · 12 revisions

Work on dev first:

  1. Make sure all final PRs are merged into dev
  2. Work on a new PR to the dev branch
    • run run_dev.R to ensure all .Rd files are built
    • increment the pkg version via usethis::use_version() using either "patch", "minor", or "major".
    • make sure the NEWS.md file is up to date and reads clearly for users. Sometimes bullet points are written in a way that users wouldn't easily understand- try to correct those.
    • Read through the README to see if any updates are needed
    • update authorship
    • make sure there are testthat tests for any new functions
    • See For CRAN steps below
    • update manifest.json using rsconnect::writeManifest()
    • git push origin dev
  3. submit PR to merge dev into master (if it doesn't already exist)
  4. Make sure all flavors of R-CMD-CHECK are passing
    • Check all notes too. See if there is anything "new" you can get rid of
  5. assign a reviewer (or two) to find any issues.
  6. test a deployment to shinyapps.io. Perhaps make a copy of demo-shinyapps.io, call it demo-shinyapps.io-vxxx where xxx = the version number. Then merge in the dev branch. Deployment to RS connect may suffice too.

After merge into master:

  1. Verify everything looks good on the {riskassessment} doc site. Sometimes it doesn't! Note it may need ~ 5 mins after a merge to master before it updates too. Fix any issues that arise.
  2. Tag a new release, naming the tag using syntax vX.X.X. Generate automatic release notes, but copy/paste the new NEWS.md contents into the "What's New?" section and rename the auto-generated content to "PRs".
  3. Go back to the dev branch and run usethis::use_version("dev"), then git push origin dev
  4. Open a new 'Next Release' PR that compares dev to master
  5. Update the demo app
    • Before updating the branch, checkout the demo-shinyapps.io branch and make a copy, naming it after the old app's version. For example, if the new release is v0.1.1, then save the previous deployed version (in this case it was v0.1.1) as demo-shinyapps.io-v010. Then deploy that version to shinyapps.io with the version number appended. For example, https://rinpharma.shinyapps.io/riskassessment_v010/
    • Go back to the demo-shinyapps.io and merge it with master to get the recent changes. Resolve merge conflicts (if any) and delete the credentials.sql file before running dev/run_dev.R to make sure everything works. Deploy the new demo version of the app from the demo-shinyapps.io branch to shinyapps.io destination titled riskassessment_test and then test everything.
    • If all is well, go ahead and publish to riskassessment and risk_assessment urls as well

For CRAN

This section is based off of r-pkgs.org and ThinkR's prep list

  1. Check for downstream dependencies using usethis::use_revdep()
  2. Update dependencies in DESCRIPTION using attachment::att_amend_desc()
  3. Check content of package for missing tags using tags <- checkhelper::find_missing_tags(); View(tags)
  4. check spelling with spelling::spell_check_package() and after making edits, add uncorrectable words to the wordlist with spelling::update_wordlist()
  5. Check URLs with urlchecker::url_check() and urlchecker::url_update()
Clone this wiki locally