Upward.Releases (upward v0.0.6)

View Source

A utility module for managing releases.

Summary

Functions

Get the name of the running application.

Get the current version of the running application.

Install a release.

Make a release permanent.

Make a RELEASES file for a given version.

Get the next patch version (of the running application).

Get the previous installed patch version of the running application.

Get a list of all the releases along with their status.

Remove the RELEASES file (from the build directory) so it is not included with a patch release.

This is as part of a version install and assumes that the release tarball has been extracted into the release directory.

Functions

app_name()

@spec app_name() :: atom()

Get the name of the running application.

current_version()

@spec current_version() :: Version.t()

Get the current version of the running application.

install_release(version)

Install a release.

This will ignore an already installed release.

make_permanent(version)

Make a release permanent.

make_releases_file(app_name, version, path \\ File.cwd!())

Make a RELEASES file for a given version.

This is only done for versions x.y.0 and creates a RELEASES file to be included with a release.

next_version(current_version \\ current_version())

@spec next_version(Version.t()) :: Version.t()

Get the next patch version (of the running application).

previous_version()

@spec previous_version() :: {:ok, Version.t()} | {:error, String.t()}

Get the previous installed patch version of the running application.

releases()

@spec releases() :: [
  {Version.t(), status :: :unpacked | :current | :permanent | :old}
]

Get a list of all the releases along with their status.

remove_releases_file(path \\ File.cwd!())

Remove the RELEASES file (from the build directory) so it is not included with a patch release.

set_unpacked(version)

This is as part of a version install and assumes that the release tarball has been extracted into the release directory.