Show whether a given semver is greater than a baseline version.
Usage
semver_gt(sv = get_default_odkc_version(), to = "1.5.0")
Arguments
- sv
The semver to compare as character ("2023.5.1", "1.5.0", "1.5"), or numeric (1.5). The value is always parsed with
semver::parse_semver()
. Default: get_default_odkc_version().- to
The semver to compare to as string. Although semver can parse complete version strings,
to
is still parsed byparse_odkc_version()
to ensure it is complete with major, minor, and patch version components.
See also
Other ru_settings:
odata_svc_parse()
,
parse_odkc_version()
,
ru_settings()
,
ru_setup()
,
semver_lt()
,
yell_if_error()
,
yell_if_missing()
Examples
get_default_odkc_version() |> semver_gt("0.8.0")
#> [1] TRUE
"2024.1.1" |> semver_gt("2024.1.0")
#> [1] TRUE
"2024.1.1" |> semver_gt("2024.1.1")
#> [1] FALSE
"2024.1.1" |> semver_gt("2024.1.2")
#> [1] FALSE