knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = F
)

Pre-requisites

Create a new release of the bot

  1. Do the usual pull, add, commit push workflow
  2. Once you are happy with the changes and want to create a release at this point, figure out what release we are on. In the terminal type:
git tag
  1. Create a lightweight tag of the next number in the sequence

Where version numbers typically follow the pattern of MAJOR.MINOR.PATCH (more info on semantic versioning) and incrementally adding versions as so:

> MAJOR version when you make incompatible API changes,
> MINOR version when you add functionality in a backwards compatible manner, and
> PATCH version when you make backwards compatible bug fixes.
git tag #.#.#
  1. Push the tag on to Github
git push origin --tags
  1. Go to github and click releases (on the sidebar on the right hand side)
  2. Click the draft a new release
  3. In the tag version space add the version you just created and add a description and title
  4. Publish the release

For more info see the Git basis -Tagging

Update and install awards bot on the server

  1. sudo to the bot (screen -x if doing this collaboratively)
  2. curl -L paste-url-to-github-release-here
  3. Update R package on server
install_github("NCEAS/awards-bot@version_number")

Note - the way this package is named is inconsistent - the package is call awardsBot while the repository is awards-bot

  1. unzip the file:
unzip awards-bot-verion.zip
  1. remove previous symlink:
rm awards-bot
  1. Create new symlink:
ln -s awardsbot-version awards-bot
  1. Create a copy of the current main_cron_script.R and name it using the current date
  2. Copy the main_cron_script.R from awards-bot for the latest version
  3. Check to see if the date is correct in the LASTRUN file
  4. Do a test by just running Rscript main_cron_script (or copy the line from the crontab)
  5. Un-comment out the line in the cron job if the script test is fine


NCEAS/awards-bot documentation built on Sept. 6, 2021, 1:47 a.m.