exrm v1.0.8 ReleaseManager.Utils
This module provides helper functions for the mix release
and
mix release.clean
tasks.
Summary
Functions
Exits with exit status 1
Change user permissions for a target file or directory
Get the local paths of the current Elixir libraries
Get the most recent release prior to the current one
Get a list of tuples representing the previous releases
Load the current project’s configuration
Merges two sets of Elixir/Erlang terms, where the terms come in the form of lists of tuples. For example, such as is found in the relx.config file
Call the _elixir mix binary with the given arguments
Get the priv path of the exrm dependency
Reads a file as Erlang terms
Get the rel path of the current project
Get the path to a file located in the rel directory of the current project. You can pass either a file name, or a list of directories to a file, like
Get the rel/.files path of the current project
Get the path to a file located in the rel/.files directory of the current project. You can pass either a file name, or a list of directories to a file, like
Get the priv/rel/files path of the exrm dependency
Get the path to a file located in priv/rel/files of the exrm dependency
Get the priv/rel path of the exrm dependency
Get the path to a file located in priv/rel of the exrm dependency
Execute relx
Sort a list of versions, latest one first. Tries to use semver version compare, but can fall back to regular string compare
Convert a string to Erlang terms
Perform some actions within the context of a specific mix environment
Writes an Elixir/Erlang term to the provided path
Writes a collection of Elixir/Erlang terms to the provided path
Functions
Get a list of tuples representing the previous releases:
Examples
get_releases #=> [{"test", "0.0.1"}, {"test", "0.0.2"}]
Merges two sets of Elixir/Erlang terms, where the terms come in the form of lists of tuples. For example, such as is found in the relx.config file
Get the path to a file located in the rel directory of the current project. You can pass either a file name, or a list of directories to a file, like:
iex> ReleaseManager.Utils.rel_dest_path "relx.config"
"path/to/project/rel/relx.config"
iex> ReleaseManager.Utils.rel_dest_path ["<project>", "lib", "<project>.appup"]
"path/to/project/rel/<project>/lib/<project>.appup"
Get the path to a file located in the rel/.files directory of the current project. You can pass either a file name, or a list of directories to a file, like:
iex> ReleaseManager.Utils.rel_file_dest_path "sys.config"
"path/to/project/rel/.files/sys.config"
iex> ReleaseManager.Utils.rel_dest_path ["some", "path", "file.txt"]
"path/to/project/rel/.files/some/path/file.txt"
Sort a list of versions, latest one first. Tries to use semver version compare, but can fall back to regular string compare.