Return the CATMAID version running on the server

catmaid_version(conn = NULL, cached = TRUE, numeric = FALSE, ...)

Arguments

conn

A catmaid_connection object. The default value of NULL implies that the most recent cached open connection will be used.

cached

Whether to use the cached version number for this connection (see details)

numeric

Whether to parse the version string into an R numeric_version object that can be used for comparisons.

...

Additional arguments passed to catmaid_fetch

Value

A character vector containing the version

Details

By default the version number for the current catmaid_connection is stored on the first request after a new login and then the cached version number is reused. Setting cached=FALSE will always force a request to the server.

CATMAID versions are now produced by git describe and look like YYYY.MM.DD-XX-gaaaaaaa where aaaaaaa is a short SHA1 hash and XX is an integer number of revisions since the last base version. Setting numeric=TRUE trims off the SHA1 hash leaving a string that can be interpreted as a four part version number (see examples).

See also

Examples

if (FALSE) {
# example of checking if server version is newer than required version
catmaid_version(numeric=TRUE)>="2016.1.1-65"
}