Batamanta.Packager (batamanta v1.5.0)

Copy Markdown View Source

Handles creation of the compressed payload tarball.

Packages the Elixir release and ERTS into a single Zstandard-compressed tarball that will be embedded in the final binary.

  • Relativization: Converts absolute paths in release scripts to relative
  • Cleanup: Removes non-essential files (src, docs, misc)
  • Boot File Preparation: Ensures correct .boot file for target platform

Summary

Functions

Packages the release and the ERTS into a single compressed tarball.

Functions

package(rel_path, erts_path, out_path, compression_level)

@spec package(Path.t(), Path.t(), Path.t(), integer()) ::
  {:ok, Path.t()} | {:error, String.t()}

Packages the release and the ERTS into a single compressed tarball.

  • rel_path - Path to the Mix release directory

  • erts_path - Path to the fetched ERTS directory

  • out_path - Path for the output compressed tarball

  • compression_level - Zstandard compression level (1-19)

  • {:ok, path} - Success with output path

  • {:error, reason} - Failure with error message