Makes use of get_version_number to get a new version number and changes this accordingly in the YAML section of index.Rmd file and optionally in NEWS.md.

update_version_number(
  protocol_code,
  commit = TRUE,
  update_news = TRUE,
  path = "."
)

Arguments

protocol_code

The protocol_code corresponding with the name of the branch that contains the new or updated protocol.

commit

Logical. Default TRUE. Whether or not to add and commit the changes to the protocol branch

update_news

Logical. Default TRUE. Whether or not to find and replace old version number by new version number in the NEWS.md heading 2.

path

Default is current working directory. Should correspond with root directory of protocolsource repo.

Value

TRUE if version number in yaml is updated. FALSE otherwise.