OTPVersion (OTPVersion v0.1.1) View Source

Provides access to Erlang/OTP version beyond System.otp_release/0 (major only).

Example:

iex> Version.match?(OTPVersion.otp_version(:semantic_versioning_scheme), ">= 17.0.0")
true

Link to this section Summary

Types

The version scheme to be passed to otp_version/1.

Functions

Returns the Erlang/OTP version in the specified version scheme. If none is specified, defaults to OTP version scheme.

Link to this section Types

Specs

version_scheme() ::
  :otp_version_scheme | :semantic_versioning_scheme | :major_only

The version scheme to be passed to otp_version/1.

  • :otp_version_scheme - full resolution version information; conforms to Erlang - Versions - 5.3 Version Scheme

  • :semantic_versioning_scheme - forces Erlang/OTP version, which does not conform to SemVer, into the format outlined in SemVer 2.0 schema (i.e., MAJOR.MINOR.PATCH), therefore compatible with Version, by padding with zeros after MINOR or truncating after PATCH

  • :major_only - equivalent to System.otp_release/0

Link to this section Functions

Link to this function

otp_version(version_scheme \\ :otp_version_scheme)

View Source

Specs

otp_version(version_scheme()) :: String.t()

Returns the Erlang/OTP version in the specified version scheme. If none is specified, defaults to OTP version scheme.