diff --git a/DESCRIPTION b/DESCRIPTION index 2d6f08bd..7984dd15 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -47,5 +47,5 @@ Config/Needs/website: tidyverse/tidytemplate Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 SystemRequirements: Subversion for install_svn, git for install_git diff --git a/NAMESPACE b/NAMESPACE index 7e0930a0..a9886f02 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -96,6 +96,7 @@ export(remote_sha) export(standardise_dep) export(system_requirements) export(update_packages) +export(version_satisfies_criteria) importFrom(stats,update) importFrom(tools,file_ext) importFrom(utils,available.packages) diff --git a/R/install-version.R b/R/install-version.R index bd9b6260..2f5c100e 100644 --- a/R/install-version.R +++ b/R/install-version.R @@ -96,6 +96,13 @@ version_from_tarball <- function(tarball_name) { ifelse(grepl(package_ver_regex, tarball_name), sub(package_ver_regex, "\\1", tarball_name), NULL) } +#' Check package version with a given criteria +#' +#' @param to_check Package version +#' @param criteria Criteria used to verify the required package version +#' +#' @return Vector with logical values +#' @export version_satisfies_criteria <- function(to_check, criteria) { to_check <- package_version(to_check) result <- apply(version_criteria(criteria), 1, function(r) { diff --git a/man/install_bioc.Rd b/man/install_bioc.Rd index ab9d76f9..9028367a 100644 --- a/man/install_bioc.Rd +++ b/man/install_bioc.Rd @@ -106,9 +106,9 @@ Other package installation: \code{\link{install_bitbucket}()}, \code{\link{install_cran}()}, \code{\link{install_dev}()}, +\code{\link{install_git}()}, \code{\link{install_github}()}, \code{\link{install_gitlab}()}, -\code{\link{install_git}()}, \code{\link{install_local}()}, \code{\link{install_svn}()}, \code{\link{install_url}()}, diff --git a/man/install_bitbucket.Rd b/man/install_bitbucket.Rd index 118cf339..530b29ce 100644 --- a/man/install_bitbucket.Rd +++ b/man/install_bitbucket.Rd @@ -133,9 +133,9 @@ Other package installation: \code{\link{install_bioc}()}, \code{\link{install_cran}()}, \code{\link{install_dev}()}, +\code{\link{install_git}()}, \code{\link{install_github}()}, \code{\link{install_gitlab}()}, -\code{\link{install_git}()}, \code{\link{install_local}()}, \code{\link{install_svn}()}, \code{\link{install_url}()}, diff --git a/man/install_cran.Rd b/man/install_cran.Rd index 804611e3..60726cda 100644 --- a/man/install_cran.Rd +++ b/man/install_cran.Rd @@ -81,9 +81,9 @@ Other package installation: \code{\link{install_bioc}()}, \code{\link{install_bitbucket}()}, \code{\link{install_dev}()}, +\code{\link{install_git}()}, \code{\link{install_github}()}, \code{\link{install_gitlab}()}, -\code{\link{install_git}()}, \code{\link{install_local}()}, \code{\link{install_svn}()}, \code{\link{install_url}()}, diff --git a/man/install_dev.Rd b/man/install_dev.Rd index bd7ccbe3..15041b99 100644 --- a/man/install_dev.Rd +++ b/man/install_dev.Rd @@ -38,9 +38,9 @@ Other package installation: \code{\link{install_bioc}()}, \code{\link{install_bitbucket}()}, \code{\link{install_cran}()}, +\code{\link{install_git}()}, \code{\link{install_github}()}, \code{\link{install_gitlab}()}, -\code{\link{install_git}()}, \code{\link{install_local}()}, \code{\link{install_svn}()}, \code{\link{install_url}()}, diff --git a/man/install_github.Rd b/man/install_github.Rd index 3608f19b..276d1b64 100644 --- a/man/install_github.Rd +++ b/man/install_github.Rd @@ -127,8 +127,8 @@ Other package installation: \code{\link{install_bitbucket}()}, \code{\link{install_cran}()}, \code{\link{install_dev}()}, -\code{\link{install_gitlab}()}, \code{\link{install_git}()}, +\code{\link{install_gitlab}()}, \code{\link{install_local}()}, \code{\link{install_svn}()}, \code{\link{install_url}()}, diff --git a/man/install_gitlab.Rd b/man/install_gitlab.Rd index f3b99ed5..f074b467 100644 --- a/man/install_gitlab.Rd +++ b/man/install_gitlab.Rd @@ -102,8 +102,8 @@ Other package installation: \code{\link{install_bitbucket}()}, \code{\link{install_cran}()}, \code{\link{install_dev}()}, -\code{\link{install_github}()}, \code{\link{install_git}()}, +\code{\link{install_github}()}, \code{\link{install_local}()}, \code{\link{install_svn}()}, \code{\link{install_url}()}, diff --git a/man/install_local.Rd b/man/install_local.Rd index 4fdf8233..163ff793 100644 --- a/man/install_local.Rd +++ b/man/install_local.Rd @@ -88,9 +88,9 @@ Other package installation: \code{\link{install_bitbucket}()}, \code{\link{install_cran}()}, \code{\link{install_dev}()}, +\code{\link{install_git}()}, \code{\link{install_github}()}, \code{\link{install_gitlab}()}, -\code{\link{install_git}()}, \code{\link{install_svn}()}, \code{\link{install_url}()}, \code{\link{install_version}()} diff --git a/man/install_svn.Rd b/man/install_svn.Rd index a0df9d9e..a34a5711 100644 --- a/man/install_svn.Rd +++ b/man/install_svn.Rd @@ -98,9 +98,9 @@ Other package installation: \code{\link{install_bitbucket}()}, \code{\link{install_cran}()}, \code{\link{install_dev}()}, +\code{\link{install_git}()}, \code{\link{install_github}()}, \code{\link{install_gitlab}()}, -\code{\link{install_git}()}, \code{\link{install_local}()}, \code{\link{install_url}()}, \code{\link{install_version}()} diff --git a/man/install_url.Rd b/man/install_url.Rd index 6a37a612..f446d12e 100644 --- a/man/install_url.Rd +++ b/man/install_url.Rd @@ -85,9 +85,9 @@ Other package installation: \code{\link{install_bitbucket}()}, \code{\link{install_cran}()}, \code{\link{install_dev}()}, +\code{\link{install_git}()}, \code{\link{install_github}()}, \code{\link{install_gitlab}()}, -\code{\link{install_git}()}, \code{\link{install_local}()}, \code{\link{install_svn}()}, \code{\link{install_version}()} diff --git a/man/install_version.Rd b/man/install_version.Rd index c15d66bb..0aa12b1f 100644 --- a/man/install_version.Rd +++ b/man/install_version.Rd @@ -134,9 +134,9 @@ Other package installation: \code{\link{install_bitbucket}()}, \code{\link{install_cran}()}, \code{\link{install_dev}()}, +\code{\link{install_git}()}, \code{\link{install_github}()}, \code{\link{install_gitlab}()}, -\code{\link{install_git}()}, \code{\link{install_local}()}, \code{\link{install_svn}()}, \code{\link{install_url}()} diff --git a/man/version_satisfies_criteria.Rd b/man/version_satisfies_criteria.Rd new file mode 100644 index 00000000..70c009df --- /dev/null +++ b/man/version_satisfies_criteria.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/install-version.R +\name{version_satisfies_criteria} +\alias{version_satisfies_criteria} +\title{Check package version with a given criteria} +\usage{ +version_satisfies_criteria(to_check, criteria) +} +\arguments{ +\item{to_check}{Package version} + +\item{criteria}{Criteria used to verify the required package version} +} +\value{ +Vector with logical values +} +\description{ +Check package version with a given criteria +}