Mix.Archive

Module responsible for managing archives.

An archive is a zip file containing the app and beam files. A valid archive must be named with the name of the application and it should contain the relative paths beginning with the application name, e.g. the root of the zip file should be my_app/ebin/Elixir.My.App.beam.

Source

Summary

create(archive_file, project_path \\ ".")

Creates an application archive

dir(path)

Returns the archive internal directory from its path

name(app, vsn)

Returns the archive name based on app and version

Functions

create(archive_file, project_path \\ ".")

Creates an application archive.

It receives the archive file in the format path/to/archive/app-vsn.ez and the path to the root of the project to be archived. Everything in the ebin and priv directories is archived.

Source
dir(path)

Returns the archive internal directory from its path.

Examples

iex> Mix.Archive.dir("foo/bar/baz-0.1.0.ez")
"baz-0.1.0"
Source
name(app, vsn)

Returns the archive name based on app and version.

Examples

iex> Mix.Archive.name("foo", nil)
"foo.ez"

iex> Mix.Archive.name("foo", "0.1.0")
"foo-0.1.0.ez"
Source