Record the manifest of versions of packages and their hashes.
Usage
record_versions(
versions = "versions.json",
repo = "https://community.r-multiverse.org",
current = multiverse.internals::get_current_versions(repo = repo)
)
Arguments
- versions
Character of length 1, file path to a JSON manifest tracking the history of released versions of packages.
- repo
Character of length 1, URL of the package repository. R-multiverse uses
"https://community.r-multiverse.org"
.- current
A data frame of current versions and hashes of packages in
repo
. This argument is exposed for testing only.
Value
NULL
(invisibly). Writes a package version manifest
and a manifest of version issues as JSON files.
Details
This function tracks a manifest containing the current version,
the current hash, the highest version ever released, and
the hash of the highest version ever released.
issues_versions()
uses this information
to determine whether the package complies with best
practices for version numbers.
Package issues
Functions like issues_versions()
and issues_descriptions()
perform health checks for all packages in R-multiverse.
For a complete list of checks, see
the issues_*()
functions listed at
https://r-multiverse.org/multiverse.internals/reference/index.html.
record_versions()
updates the version number history
of releases in R-multiverse, and record_issues()
gathers
together all the issues about R-multiverse packages.
Examples
# R-multiverse uses https://community.r-multiverse.org as the repo.
repo <- "https://wlandau.r-universe.dev" # just for testing and examples
output <- tempfile()
versions <- tempfile()
# First snapshot:
record_versions(
versions = versions,
repo = repo
)
readLines(versions)
#> [1] "["
#> [2] " {"
#> [3] " \"package\": \"autometric\","
#> [4] " \"version_current\": \"0.1.2.9000\","
#> [5] " \"hash_current\": \"13ec8d2cfba955081cf3e19eb5e74af07ba89bef\""
#> [6] " },"
#> [7] " {"
#> [8] " \"package\": \"crew\","
#> [9] " \"version_current\": \"0.10.2.9001\","
#> [10] " \"hash_current\": \"1e5a11392a12fb044c90e2889fd641f382a92c5e\""
#> [11] " },"
#> [12] " {"
#> [13] " \"package\": \"crew.aws.batch\","
#> [14] " \"version_current\": \"0.0.7.9000\","
#> [15] " \"hash_current\": \"caa4752f528f15510eccf5fab0cecb1cdfb5fa4b\""
#> [16] " },"
#> [17] " {"
#> [18] " \"package\": \"crew.cluster\","
#> [19] " \"version_current\": \"0.3.3.9000\","
#> [20] " \"hash_current\": \"02e3d32812394fb36bb6d7c76146af122fa4162c\""
#> [21] " },"
#> [22] " {"
#> [23] " \"package\": \"mirai\","
#> [24] " \"version_current\": \"1.3.1.9000\","
#> [25] " \"hash_current\": \"2020f0a5dfed1ad48a3afd5de0668d929242f839\""
#> [26] " },"
#> [27] " {"
#> [28] " \"package\": \"nanonext\","
#> [29] " \"version_current\": \"1.4.0.9000\","
#> [30] " \"hash_current\": \"4814abd0d47977ead3773da44e1e00f4a6c45e0a\""
#> [31] " }"
#> [32] "]"
# In subsequent snapshots, we have historical information about versions.
record_versions(
versions = versions,
repo = repo
)
readLines(versions)
#> [1] "["
#> [2] " {"
#> [3] " \"package\": \"autometric\","
#> [4] " \"version_current\": \"0.1.2.9000\","
#> [5] " \"hash_current\": \"13ec8d2cfba955081cf3e19eb5e74af07ba89bef\","
#> [6] " \"version_highest\": \"0.1.2.9000\","
#> [7] " \"hash_highest\": \"13ec8d2cfba955081cf3e19eb5e74af07ba89bef\""
#> [8] " },"
#> [9] " {"
#> [10] " \"package\": \"crew\","
#> [11] " \"version_current\": \"0.10.2.9001\","
#> [12] " \"hash_current\": \"1e5a11392a12fb044c90e2889fd641f382a92c5e\","
#> [13] " \"version_highest\": \"0.10.2.9001\","
#> [14] " \"hash_highest\": \"1e5a11392a12fb044c90e2889fd641f382a92c5e\""
#> [15] " },"
#> [16] " {"
#> [17] " \"package\": \"crew.aws.batch\","
#> [18] " \"version_current\": \"0.0.7.9000\","
#> [19] " \"hash_current\": \"caa4752f528f15510eccf5fab0cecb1cdfb5fa4b\","
#> [20] " \"version_highest\": \"0.0.7.9000\","
#> [21] " \"hash_highest\": \"caa4752f528f15510eccf5fab0cecb1cdfb5fa4b\""
#> [22] " },"
#> [23] " {"
#> [24] " \"package\": \"crew.cluster\","
#> [25] " \"version_current\": \"0.3.3.9000\","
#> [26] " \"hash_current\": \"02e3d32812394fb36bb6d7c76146af122fa4162c\","
#> [27] " \"version_highest\": \"0.3.3.9000\","
#> [28] " \"hash_highest\": \"02e3d32812394fb36bb6d7c76146af122fa4162c\""
#> [29] " },"
#> [30] " {"
#> [31] " \"package\": \"mirai\","
#> [32] " \"version_current\": \"1.3.1.9000\","
#> [33] " \"hash_current\": \"2020f0a5dfed1ad48a3afd5de0668d929242f839\","
#> [34] " \"version_highest\": \"1.3.1.9000\","
#> [35] " \"hash_highest\": \"2020f0a5dfed1ad48a3afd5de0668d929242f839\""
#> [36] " },"
#> [37] " {"
#> [38] " \"package\": \"nanonext\","
#> [39] " \"version_current\": \"1.4.0.9000\","
#> [40] " \"hash_current\": \"4814abd0d47977ead3773da44e1e00f4a6c45e0a\","
#> [41] " \"version_highest\": \"1.4.0.9000\","
#> [42] " \"hash_highest\": \"4814abd0d47977ead3773da44e1e00f4a6c45e0a\""
#> [43] " }"
#> [44] "]"