deployer/docs/installation.md

73 lines
1.5 KiB
Markdown
Raw Normal View History

2019-07-02 08:05:15 +03:00
# Installation
2021-04-09 22:49:41 +02:00
Phar is the best distribution mechanism for a tool.
2019-07-02 08:05:15 +03:00
2021-04-09 22:49:41 +02:00
### Globally
2019-07-02 08:05:15 +03:00
2021-04-09 22:49:41 +02:00
To install Deployer as phar archive globally, run the following commands:
2019-07-02 08:05:15 +03:00
```sh
curl -LO https://deployer.org/deployer.phar
mv deployer.phar /usr/local/bin/dep
chmod +x /usr/local/bin/dep
```
2021-04-09 22:49:41 +02:00
> After installing Deployer globally with will be able to initialize a
> recipe in new project with just `dep init` command.
If you need another version of Deployer, you can find it on
the [download page](https://deployer.org/download).
2019-07-02 08:05:15 +03:00
Later, to upgrade Deployer, run the command:
```sh
dep self-update
```
2021-04-09 22:49:41 +02:00
To upgrade to the next major release, if available, use the `--upgrade (-u)`
option:
2019-07-02 08:05:15 +03:00
```sh
dep self-update --upgrade
```
2021-04-09 22:49:41 +02:00
### Distribution
2019-07-02 08:05:15 +03:00
```sh
composer require deployer/dist --dev
```
Then to use Deployer, run the following command:
```sh
php vendor/bin/dep
```
2021-04-09 22:49:41 +02:00
This is preferred method of installing Deployer in composer project. In
distribution repo only phar is committed, and its dependencies will not
conflict with your project dependencies.
2019-07-02 08:05:15 +03:00
2021-04-09 22:49:41 +02:00
Download `deployer.phar` and commit it. Totally okay. Update it via
with `dep self-update`.
2019-07-02 08:05:15 +03:00
2021-04-09 22:49:41 +02:00
### Source
Use it if you really need Deployer source files.
2019-07-02 08:05:15 +03:00
```sh
2021-04-09 22:49:41 +02:00
composer require deployer/deployer --dev
2019-07-02 08:05:15 +03:00
```
### Autocomplete
2021-04-09 22:49:41 +02:00
Deployer comes with an autocomplete support for bash & zsh, so you don't need to
remember task names and options.
2019-07-02 08:05:15 +03:00
Add next line to your `~/.bash_profile` or `~/.zshrc`:
2019-07-02 08:05:15 +03:00
2021-04-09 22:49:41 +02:00
```shell
eval "$(dep autocomplete)"
```
2019-07-02 08:05:15 +03:00
Read [getting started](getting-started.md) next.