Semver

Utilities for working with semver.org-compliant version strings.

Source

Summary

is_valid(version)

Validates that version is a valid Semver string

parse!(version)

Parses a version string into a Semver struct. If version is not a valid version string, it raises Semver.Error

parse(version)

Parses version into a Semver struct

to_string(semver)

Converts the semver struct into a version string

version()

Gets the version string of the module

Types

t :: %Semver{major: integer, minor: integer, patch: integer, prerelease: [String.t], build: [String.t]}

Functions

is_valid(version)

Specs:

Validates that version is a valid Semver string.

Source
parse(version)

Specs:

  • parse(String.t) :: {:ok, t} | {:error, :invalid}

Parses version into a Semver struct.

Source
parse!(version)

Specs:

Parses a version string into a Semver struct. If version is not a valid version string, it raises Semver.Error.

Source
to_string(semver)

Specs:

Converts the semver struct into a version string.

Source
version()

Specs:

Gets the version string of the module.

Source