ReleaseManager.Utils
This module provides helper functions for the mix release
and
mix release.clean
tasks.
Summary↑
abort!() | Exits with exit status 1 |
chmod(target, flags) | Change user permissions for a target file or directory |
debug(message) | Print an informational message without color |
error(message) | Print an error message in red |
get_elixir_path() | Get the local path of the current elixir executable |
get_last_release(project) | Get the most recent release prior to the current one |
get_releases(project) | Get a list of tuples representing the previous releases: |
info(message) | Print an informational message in green |
load_config(env) | Load the current project’s configuration |
merge(old, new) | 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 |
mix(command, env) | Call the _elixir mix binary with the given arguments |
mix(command, env, atom3) | |
notice(message) | Print a notice in yellow |
priv_path() | Get the priv path of the exrm dependency |
read_terms(path) | Reads a file as Erlang terms |
rel_dest_path() | Get the rel path of the current project |
rel_dest_path(files) | 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: |
rel_file_dest_path() | Get the rel/files path of the current project |
rel_file_dest_path(files) | 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: |
rel_file_source_path() | Get the priv/rel/files path of the exrm dependency |
rel_file_source_path(file) | Get the path to a file located in priv/rel/files of the exrm dependency |
rel_source_path() | Get the priv/rel path of the exrm dependency |
rel_source_path(file) | Get the path to a file located in priv/rel of the exrm dependency |
relx(name, version, verbosity, upgrade?, dev_mode?) | Execute |
sort_versions(versions) | Sort a list of versions, latest one first. Tries to use semver version compare, but can fall back to regular string compare |
string_to_terms(str) | Convert a string to Erlang terms |
warn(message) | Print a warning message in yellow |
with_env(env, fun) | Perform some actions within the context of a specific mix environment |
write_term(path, term) | Writes an Elixir/Erlang term to the provided path |
write_terms(path, terms) | Writes a collection of Elixir/Erlang terms to the provided path |
Functions
Exits with exit status 1
Change user permissions for a target file or directory
Print an informational message without color
Print an error message in red
Get the local path of the current elixir executable
Get the most recent release prior to the current one
Get a list of tuples representing the previous releases:
Examples
get_releases #=> [{"test", "0.0.1"}, {"test", "0.0.2"}]
Print an informational message in green
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
Print a notice in yellow
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:
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 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:
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"
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
Print a warning message in yellow
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