M ChangeLog => ChangeLog +7 -0
@@ 1,3 1,10 @@
+2023-09-07 Enrico Schumann <es@enricoschumann.net>
+
+ * DESCRIPTION (Version): 0.3.4
+
+ * R/functions.R (latest_version): add argument
+ "strict", which is passed on to base::package_version
+
2022-10-13 Enrico Schumann <es@enricoschumann.net>
* DESCRIPTION (Version): 0.3.3
M DESCRIPTION => DESCRIPTION +4 -3
@@ 1,8 1,8 @@
Package: esutils
Type: Package
Title: esutils
-Version: 0.3.3
-Date: 2022-10-13
+Version: 0.3.4
+Date: 2023-09-07
Maintainer: Enrico Schumann <es@enricoschumann.net>
Authors@R: person(given = "Enrico", family = "Schumann",
role = c("aut", "cre"),
@@ 14,4 14,5 @@ SystemRequirements: ssconvert (Gnumeric), pdftotext (Xpdf)
Imports: crayon, datetimeutils, git2r, graphics,
textutils, tools, utils, zip, zoo
Suggests: tinytest, weaver
-URL: http://enricoschumann.net/esutils/
+URL: http://enricoschumann.net/esutils/ ,
+ https://git.sr.ht/~enricoschumann/esutils<
\ No newline at end of file
M R/functions.R => R/functions.R +3 -2
@@ 214,7 214,8 @@ char2num <- function(s, dec = ",", big.mark = ".") {
as.numeric(sub(dec, Sys.localeconv()[["decimal_point"]], s, fixed = TRUE))
}
-latest_version <- function(pkg, path = ".", type = "source") {
+latest_version <-
+function(pkg, path = ".", type = "source", strict = TRUE) {
if (type == "source")
ext <- "[.]tar[.]gz$"
else if (type == "binary" || type == "zip")
@@ 222,7 223,7 @@ latest_version <- function(pkg, path = ".", type = "source") {
all_p <- dir(path, pattern = paste0(pkg, "_.*", ext))
all_v <- gsub(paste0(".*_([0-9]+[-.][0-9]+[-.][0-9]+)", ext),
"\\1", all_p)
- all_v <- package_version(all_v)
+ all_v <- package_version(all_v, strict = strict)
all_p[max(all_v) == all_v]
}
M README.md => README.md +1 -1
@@ 2,7 2,7 @@
Various R tools, for instance for finding git repositories
and doing backups. Most functions in esutils are at
-some point moved to more appropriate packages.
+some point moved to more appropriate specialized packages.
[ [More] ](http://enricoschumann.net/R/packages/esutils/)
M man/build.Rd => man/build.Rd +4 -1
@@ 22,7 22,7 @@
show.test.results = TRUE,
verbose = TRUE,
use.crayon = FALSE)
- latest_version(pkg, path = ".", type = "source")
+ latest_version(pkg, path = ".", type = "source", strict = TRUE)
}
\arguments{
\item{pkg}{
@@ 37,6 37,9 @@
\item{as.cran}{
logical
}
+ \item{strict}{
+ logical. See \code{\link{package_version}}.
+ }
}
\details{