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 releaseto createenv.shandvm.args. - Configuration for
mix releaseprovided byElixir.Mix.Tasks.AntikytheraCore.GenerateRelease.config_for_mix_release/0.
- Template files (
- Release generation
- Ensure that source files are compiled and
<antikythera_instance>.appis up-to-date. - If a previous release is found, generate
*.appupandrelupfiles.*.appupfiles are generated before assembling.relupfile is generated after assembling.
- Generate a new release by
:assemblestep ofmix release. - Generate
RELEASESfile, which is required by:release_handler.
- Ensure that source files are compiled and
- Cleanup
- Make a tarball by
:tarstep 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