parse_odkc_version | R Documentation |
semver
.parse_odkc_version(v, env_var = "ODKC_VERSION")
v |
A string (e.g. "ODKC_VERSION=") or number (e.g. 0.8, 1.5) of a complete or partial semver, or a semver of class "svlist". |
env_var |
A string indicating which environment variable was targeted. This is used in the warning to advise which environment variable to update. If set to an empty string, the warning message is suppressed. Default: "ODKC_VERSION". |
Past versions of ruODK advised to set ODKC_VERSION to a floating point number
indicating major and minor versions, e.g. ODKC_VERSION=0.7
or
ODKC_VERSION=1.5
.
ODK Central has since switched to semantic versioning, e.g.
ODKC_VERSION=ODKC_VERSION=
.
To preserve backwards compatibility, ruODK handles both formats gracefully, but emits a helpful warning to update the version string if the older format is detected, or the version string is missing the minor or patch version.
semver::svlist The version as semver of major, minor, and patch.
Other ru_settings:
odata_svc_parse()
,
ru_settings()
,
ru_setup()
,
semver_gt()
,
semver_lt()
,
yell_if_error()
,
yell_if_missing()
parse_odkc_version("1.2.3")
# Warn: too short
parse_odkc_version("1")
parse_odkc_version("1.2")
# Warn: too long
parse_odkc_version("1.2.3.4")
# Warn: otherwise invalid
parse_odkc_version("1.2.")
parse_odkc_version(".2.3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.