~enricoschumann/esutils

36bb677730904798a0f3d505f447c941ac712d6b — Enrico Schumann 1 year, 1 month ago 591875c
Simplify regexp
3 files changed, 6 insertions(+), 3 deletions(-)

M ChangeLog
M DESCRIPTION
M R/functions.R
M ChangeLog => ChangeLog +4 -0
@@ 1,3 1,7 @@
2023-10-16  Enrico Schumann  <es@enricoschumann.net>

        * R/functions.R (latest_version): simplify regexp

2023-09-07  Enrico Schumann  <es@enricoschumann.net>

        * DESCRIPTION (Version): 0.3.4

M DESCRIPTION => DESCRIPTION +1 -1
@@ 2,7 2,7 @@ Package: esutils
Type: Package
Title: esutils
Version: 0.3.4
Date: 2023-09-07
Date: 2023-10-16
Maintainer: Enrico Schumann <es@enricoschumann.net>
Authors@R: person(given = "Enrico", family = "Schumann",
                  role  = c("aut", "cre"),

M R/functions.R => R/functions.R +1 -2
@@ 221,8 221,7 @@ function(pkg, path = ".", type = "source", strict = TRUE) {
    else if (type == "binary" || type == "zip")
        ext <- "[.]zip$"
    all_p <- dir(path, pattern = paste0(pkg, "_.*", ext))
    all_v <- gsub(paste0(".*_([0-9]+[-.][0-9]+[-.][0-9]+)", ext),
                  "\\1", all_p)
    all_v <- gsub(paste0("[^_]+_(.*)", ext), "\\1", all_p)
    all_v  <- package_version(all_v, strict = strict)
    all_p[max(all_v) == all_v]
}