build-package/build_utils.R

# variable for template
qgis_build_version <- stringr::str_match(qgisprocess::qgis_version(), "[0-9.]+[[:cntrl:][:alnum:]]")[,1]

# load function template
fun_tmpl <- readr::read_file("build-package/templates/fun_onLoad.R")

# evaluate function template against existing variables
fun_code <- glue::glue(fun_tmpl)

readr::write_file(glue::glue_collapse(list(fun_code,
                                           readr::read_file("build-package/functions/check_algorithm_necessities.R"),
                                           readr::read_file("build-package/functions/option_checking_functions.R")),
                                      sep = "\n\n"),
                  glue::glue("./R/utils.R"))
JanCaha/r_package_qgis documentation built on Nov. 3, 2024, 5:25 p.m.