Skip to content

Commit d10b9d5

Browse files
author
José Valim
committed
Improve docs for archives
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
1 parent e38be07 commit d10b9d5

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

lib/mix/lib/mix/tasks/archive.build.ex

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,24 @@ defmodule Mix.Tasks.Archive.Build do
77
Builds an archive according to the specification of the
88
[Erlang Archive Format](http://www.erlang.org/doc/man/code.html).
99
10+
Archives are meant to contain small projects, usually installed
11+
locally. Archives may be installed into a Mix environment by
12+
running `mix archive.install`. Once installed, the archive is
13+
available to all Mix projects. For this reason, the functionality
14+
behind archives is limited. For instance, archives do not include
15+
dependencies, as those would conflict with any dependency in a
16+
Mix project after the archive is installed. In general, we recommend
17+
the usage of archives to be limited for extensions of Mix, such
18+
as custom SCMs, package managers, etc. For general scripts to be
19+
installed into machines, please see `mix escript.build`.
20+
1021
The archive will be created in the current directory (which is
1122
expected to be the project root), unless an argument `-o` is
1223
provided with the file name.
1324
14-
Archives are meant to contain small projects, usually installed
15-
locally. By default, this command archives the current project
16-
but the `-i` and `-o` options can be used to archive any directory.
17-
For example, `mix archive.build` with no options translates to:
25+
By default, this command archives the current project but the `-i`
26+
option can be used to archive any directory. For example,
27+
`mix archive.build` with no options translates to:
1828
1929
mix archive.build -i _build/ENV/lib/APP -o APP-VERSION.ez
2030

lib/mix/lib/mix/tasks/archive.install.ex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ defmodule Mix.Tasks.Archive.Install do
66
@moduledoc """
77
Installs an archive locally.
88
9-
If no argument is supplied but there is an archive in the project's root directory
10-
(created with `mix archive.build`), then the archive will be installed
11-
locally. For example:
9+
If no argument is supplied but there is an archive in the project's
10+
root directory (created with `mix archive.build`), then the archive
11+
will be installed locally. For example:
1212
1313
mix do archive.build, archive.install
1414
15-
If an argument is provided, it should be a local path or a URL to a prebuilt archive,
16-
a git repository, a github repository, or a hex package.
15+
If an argument is provided, it should be a local path or a URL to a
16+
prebuilt archive, a git repository, a github repository, or a hex
17+
package.
1718
1819
mix archive.install archive.ez
1920
mix archive.install path/to/archive.ez

0 commit comments

Comments
 (0)