antikythera v0.2.0 mix antikythera_core.generate_release View Source
Generates a new release tarball for antikythera instance using relx.
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
.beam
and.app
files.vm.args
: resides in the git repository and is copied to the release by relx’s overlay mechanism.sys.config
: generated from mix config and then copied to the release by relx’s overlay mechanism.relx.config
: generated fromrelx.config.eex
.
Release generation
- If needed, generate .appup files and relup file.
- Generate a new release from the input files by
:relx.do/2
.
Cleanup
- Move some files and apply patch to boot script, in order to suit our needs.
- Make a tarball. This step also uses
:relx.do/2
. - Remove temporary files.
Link to this section Summary
Link to this section Functions
A task needs to implement run
which receives
a list of command line args.
Callback implementation for Mix.Task.run/1
.