deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.56k stars 1.48k forks source link

The "--hosts" option does not exist. #3692

Closed Seb33300 closed 1 year ago

Seb33300 commented 1 year ago

I am trying to pass the host directly in the command line and omit host() in my deploy.php:

dep deploy --hosts exemple.com -o branch=develop -o deploy_path=/path/www -o keep_releases=3 -vvv 

The "--hosts" option does not exist.

Any idea why the --hosts option is not working? In the documentation I can see that the command support host names. But no example is provided, so I used the "--host" option from 6.x documentation. My dev environment is on Windows, I cannot install the completion script.

The deployment is working properly if I add host('exemple.com'); in my deploy.php and remove the hosts option.

I also tried:

dep deploy exemple.com -o branch=develop -o deploy_path=/path/www -o keep_releases=3 -vvv 

No host selected. Please, check your selector:
exemple.com

antonmedv commented 1 year ago

https://deployer.org/docs/7.x/UPGRADE#upgrade-from-6x-to-7x

Seb33300 commented 1 year ago

Hi, I cannot find any information on that page too about passing the host using command line.

antonmedv commented 1 year ago

https://deployer.org/docs/7.x/selector

Seb33300 commented 1 year ago

Using selector/alias (last example from my initial post) still require to define hosts in deploy.php But this is what I am trying to avoid.

antonmedv commented 1 year ago

I see. Right now it’s not supposed.

IvanShishkin commented 11 months ago

Hi. Try it like this dep deploy -o branch=master -o hostname=example.com

Seb33300 commented 11 months ago

Hi. Try it like this dep deploy -o branch=master -o hostname=example.com

This doesn't work, that error is returned:

No host selected. Please, check your selector: ...

It still require to define the host in deploy.php.