Upward.Utils (upward v0.0.6)

View Source

General utility functions.

Summary

Functions

Checks if a version is a base patch version.

Parses a version string into a Version struct.

Checks if the difference between two versions is a patch release.

Finds the previous release path within the build directory.

Functions

is_base_patch?(version)

Checks if a version is a base patch version.

Base patch versions are versions that have a patch number of 0.

Examples:

Upward.Utils.is_base_patch?("1.0.0")
iex> true

Upward.Utils.is_base_patch?("1.0.1")
iex> false

parse_version(version)

Parses a version string into a Version struct.

Examples:

Upward.Utils.parse_version("1.0.0")
iex> %Version{major: 1, minor: 0, patch: 0}

patch_release?(v1, v2)

Checks if the difference between two versions is a patch release.

Examples:

Upward.Utils.patch_release?("1.0.0", "1.0.1")
iex> true

Upward.Utils.patch_release?("1.0.0", "1.1.0")
iex> false

previous_release_path(paths, current_version)

Finds the previous release path within the build directory.