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. when ANTIKYTHERA_COMPILE_ENV=local), files are generated under rel_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
    • Release generation
      • Ensure that source files are compiled and <antikythera_instance>.app is up-to-date.
      • If a previous release is found, generate *.appup and relup files.
        • *.appup files are generated before assembling.
        • relup file is generated after assembling.
      • Generate a new release by :assemble step of mix release.
      • Generate RELEASES file, which is required by :release_handler.
    • Cleanup
      • Make a tarball by :tar step of mix release, then move it to the version directory.

Summary

Functions

Generates a release configuration required by mix antikythera_core.generate_release.

Functions

Link to this function

config_for_mix_release()

View Source

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