distillery v2.0.0-rc.1 Mix.Releases.Overlays
This module is responsible for applying overlays to a release, prior to packaging.
Overlays are templated with EEx, with bindings set to the values configured in overlay_vars
.
There are some preconfigured overlay variables, namely:
erts_vsn
: The version of ERTS used by this releaserelease_name
: The name of the current releaserelease_version
: The version of the current release
For example, given a release named my_release
, version 0.1.0
:
{:mkdir, "releases/<%= release_version %>/foo"}
The above overlay will create a directory, rel/my_release/releases/0.1.0/foo
. Overlay input paths are
relative to the project root, but overlay output paths are relative to the root directory for the current
release, which is why the directory is created in rel/my_release
, and not in the project root.
Link to this section Summary
Functions
Applies a list of overlays to the current release.
Returns {:ok, output_paths}
or {:error, details}
, where details
is
one of the following
Link to this section Functions
Applies a list of overlays to the current release.
Returns {:ok, output_paths}
or {:error, details}
, where details
is
one of the following:
- {:invalid_overlay, term} - a malformed overlay object
- {:template_str, desc} - templating an overlay parameter failed
- {:template_file, file, line, desc} - a template overlay failed
- {:overlay_failed, term, overlay} - applying an overlay failed