Figure out the latest version of a project or file.

resolveLatestVersion(project, url)

resolveLatestID(id, url)

Arguments

project

String containing the project identifier.

url

String containing the URL of the ArtifactDB endpoint.

id

String containing a file identifier.

Value

For resolveLatestVersion, a string containing the latest version in its canonical form.

For resolveLatestID, id is updated with any "latest" version alias replaced by its canonical form.

Author

Aaron Lun

Examples

resolveLatestVersion(example.project, example.url)
#> [1] "modified"

unpacked <- unpackID(example.id)
unpacked$version <- "latest"
latest.id <- do.call(packID, unpacked)
resolveLatestID(latest.id, example.url)
#> [1] "test-public:blah.txt@modified"