inst/migrate/0.6.1.R

migrate <- function(data, path, config) {
  if (!is.null(data$archive_version) && data$archive_version >= "0.6.1") {
    migration_result(FALSE, data)
  }

  updated <- FALSE
  if (file_exists("README.md", workdir = path, check_case = FALSE) &&
      is.null(data$meta$hash_readme)) {
    updated <- TRUE
    data$meta$hash_readme <- withr::with_dir(path, {
      hash_files(dir(pattern = "readme.md", ignore.case = TRUE))
    })
  } else {
    updated <- FALSE
  }

  migration_result(updated, data)
}

Try the orderly package in your browser

Any scripts or data that you put into this service are public.

orderly documentation built on Sept. 22, 2021, 5:09 p.m.