ruODK uses an environment variable ODKC_VERSION to keep track of the major and minor version of ODK Central. This helps to determine backwards incompatible behaviour. The internal handling is somewhat hacky in that the major.minor version is treated as floating point as.double number which worked completely fine with the old ODK Central versioning scheme.
With the new ODK Central versioning scheme that uses the release year as major version, and running minor and patch versions, we should handle the Central version better.
I propose to use the R package semver which gracefully compares version strings across both schemas.
Feature
ruODK
uses an environment variableODKC_VERSION
to keep track of the major and minor version of ODK Central. This helps to determine backwards incompatible behaviour. The internal handling is somewhat hacky in that themajor.minor
version is treated as floating pointas.double
number which worked completely fine with the old ODK Central versioning scheme.With the new ODK Central versioning scheme that uses the release year as major version, and running minor and patch versions, we should handle the Central version better.
I propose to use the R package semver which gracefully compares version strings across both schemas.
Created on 2023-08-03 with reprex v2.0.2
get_default_odkc_version
to parseODKC_VERSION="1.5"
as "1.5.0", return svlist instead ofDouble
, upgrade testsif (odkc_version < semver::parse_semver("1.5.0")) {...}