View Source mix antikythera_core.generate_release (antikythera v0.5.1)
Generates a new release tarball for antikythera instance using mix release
.
Notes on the implementation details of this task:
- Release generation is basically done under
rel_erlang-*/
. During tests (i.e. whenANTIKYTHERA_COMPILE_ENV=local
), files are generated underrel_local_erlang-*/
.- Erlang/OTP major version number is included in the path in order to distinguish artifacts generated by different OTP releases. No binary compatibility is maintained by major version release of Erlang/OTP due to precompilation of Elixir's regex sigils. For more details see documentation for Regex module.
- Generated releases are placed under
rel(_local)_erlang-*/<antikythera_instance>/releases/
. - If no previous releases found, this task generates a new release from scratch (i.e. without relup). If any previous releases exist, relup file to upgrade from the latest existing release to the current release is also generated.
- Making a new release tarball consists of the following steps:
- Preparation
- Template files (
rel/*.eex
) used bymix release
to createenv.sh
andvm.args
. - Configuration for
mix release
provided byElixir.Mix.Tasks.AntikytheraCore.GenerateRelease.config_for_mix_release/0
.
- Template files (
- Release generation
- Ensure that source files are compiled and
<antikythera_instance>.app
is up-to-date. - If a previous release is found, generate
*.appup
andrelup
files.*.appup
files are generated before assembling.relup
file is generated after assembling.
- Generate a new release by
:assemble
step ofmix release
. - Generate
RELEASES
file, which is required by:release_handler
.
- Ensure that source files are compiled and
- Cleanup
- Make a tarball by
:tar
step ofmix release
, then move it to the version directory.
- Make a tarball by
- Preparation
Summary
Functions
Generates a release configuration required by mix antikythera_core.generate_release
.
Functions
Generates a release configuration required by mix antikythera_core.generate_release
.
A release name for the configuration must be identical to the antikythera instance name.
The following is an example configuration for antikythera_instance_example
:
def project do
[
releases: [
antikythera_instance_example: &Elixir.Mix.Tasks.AntikytheraCore.GenerateRelease.config_for_mix_release/0,
...
]
]
end