View Source mix archive.install (Mix v1.13.4)
Installs an archive locally.
If no argument is supplied but there is an archive in the project's
root directory (created with mix archive.build
), then the archive
will be installed locally. For example:
mix do archive.build, archive.install
If an argument is provided, it should be a local path to a prebuilt archive, a Git repository, a GitHub repository, or a Hex package.
mix archive.install archive.ez
mix archive.install path/to/archive.ez
mix archive.install git https://path/to/git/repo
mix archive.install git https://path/to/git/repo branch git_branch
mix archive.install git https://path/to/git/repo tag git_tag
mix archive.install git https://path/to/git/repo ref git_ref
mix archive.install github user/project
mix archive.install github user/project branch git_branch
mix archive.install github user/project tag git_tag
mix archive.install github user/project ref git_ref
mix archive.install hex hex_package
mix archive.install hex hex_package 1.2.3
After installation, the tasks in the archive are available locally:
mix some_task
Note that installing via Git, GitHub, or Hex fetches the source of the archive and builds it, while using local path uses a pre-built archive.
Command line options
--sha512
- checks the archive matches the given SHA-512 checksum. Only applies to installations via a local path--force
- forces installation without a shell prompt; primarily intended for automation in build systems like Make--submodules
- fetches repository submodules before building archive from Git or GitHub--app
- specifies a custom app name to be used for building the archive from Git, GitHub, or Hex--organization
- set this for Hex private packages belonging to an organization--repo
- set this for self-hosted Hex instances, defaults tohexpm