/Elixir 1.11

mix archive.build

Builds an archive according to the specification of the Erlang Archive Format.

Archives are meant to contain small projects, usually installed locally. Archives may be installed into a Mix environment by running mix archive.install. Once installed, the archive is available to all Mix projects. For this reason, the functionality behind archives is limited. For instance, archives do not include dependencies, as those would conflict with any dependency in a Mix project after the archive is installed. In general, we recommend the usage of archives to be limited for extensions of Mix, such as custom SCMs, package managers, and the like. For general scripts to be distributed to developers, please see mix escript.build.

The archive will be created in the current directory (which is expected to be the project root), unless an argument -o is provided with the file name.

By default, this command archives the current project but the -i option can be used to archive any directory. For example, mix archive.build with no options translates to:

mix archive.build -i _build/ENV/lib/APP -o APP-VERSION.ez

Command line options

  • -o - specifies output file name. If there is a mix.exs, defaults to "APP-VERSION.ez".

  • -i - specifies the input directory to archive. If there is a mix.exs, defaults to the current application build.

  • --no-compile - skips compilation. Only applies when mix.exs is available.

  • --include-dot-files - adds dot files from priv directory to the archive.

© 2012 Plataformatec
Licensed under the Apache License, Version 2.0.