Deployer: How to install and run Deployer on Windows 10

Created on 1 Oct 2016  ·  4Comments  ·  Source: deployphp/deployer

| Q | A |
| --- | --- |
| Issue Type | Question |
| Deployer Version | 3.0 |
| Local Machine OS | Window 10 |
| Remote Machine OS | N/A |

Description

  • Kindly tell me how to install and run Deployer on Windows 10.
    I have followed below steps:
  • Run command in cmd: D:\composer require deployer/deployer:~3.0
  • Then D:php vendor/bin/dep
  • When I run above command it shows me below thing:
    dir=$(d=${0%[/]*}; cd "$d"; cd "../deployer/deployer/bin" && pwd)

    See if we are running in Cygwin by checking for cygpath program

if command -v 'cygpath' >/dev/null 2>&1; then
# Cygwin paths start with /cygdrive/ which will break windows PHP,
# so we need to translate the dir path to windows format. However
# we could be using cygwin PHP which does not require this, so we
# test if the path to PHP starts with /cygdrive/ rather than /usr/bin
if [[ $(which php) == /cygdrive/* ]]; then
dir=$(cygpath -m "$dir");
fi
fi

dir=$(echo $dir | sed 's/ /\ /g')
"${dir}/dep" "$@"

Also when I tried to run 'dep' command D:>dep self-updat, it shows me this error:
'dep' is not recognized as an internal or external command,
operable program or batch file.

Now what should I do to make and run deployer script? Please tell me the further steps

Your prompt response will be highly appreciated.

Thanks

Most helpful comment

git bash

For anyone running git bash on windows, run the _bash shell script_ in vendor/bin instead of running php on the "dep" php files found under the _vendor_ tree

Do this:
$ vendor/bin/dep deploy ... ✔️

Don't run php like this:
$ php vendor/deployer/deployer/bin/dep deploy ...
$ php vendor/deployer/deployer/bin/dep deploy ...

Extra note
Note that there's two files called "dep: in vendor/bin.

  • When running in CMD window, "call vendor\bin\dep" runs the dep.bat Windows batch file.
  • When running in bash shell, "vendor/bin/dep" runs the dep (no extension) shell script file

All 4 comments

It's looks like problem with your environment, not deployer.

I had the same problem, the command php vendor/bin/dep returns the same result.

The file isn't a PHP file, it's a shell file, so you should call it with call vendor/bin/dep in Windows (tested with Windows 10).

php vendor/bin/dep results:

dir=$(d=${0%[/\\]*}; cd "$d"; cd "../deployer/deployer/bin" && pwd)

# See if we are running in Cygwin by checking for cygpath program
if command -v 'cygpath' >/dev/null 2>&1; then
        # Cygwin paths start with /cygdrive/ which will break windows PHP,
        # so we need to translate the dir path to windows format. However
        # we could be using cygwin PHP which does not require this, so we
        # test if the path to PHP starts with /cygdrive/ rather than /usr/bin
        if [[ $(which php) == /cygdrive/* ]]; then
                dir=$(cygpath -m "$dir");
        fi
fi

dir=$(echo $dir | sed 's/ /\ /g')
"${dir}/dep" "$@"

call vendor/bin/dep results:

Deployer master

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -f, --file[=FILE]     Specify Deployer file
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help    Displays help for a command
  init    Initialize deployer system in your project
  list    Lists commands
  worker  Deployer uses workers for parallel deployment

git bash

For anyone running git bash on windows, run the _bash shell script_ in vendor/bin instead of running php on the "dep" php files found under the _vendor_ tree

Do this:
$ vendor/bin/dep deploy ... ✔️

Don't run php like this:
$ php vendor/deployer/deployer/bin/dep deploy ...
$ php vendor/deployer/deployer/bin/dep deploy ...

Extra note
Note that there's two files called "dep: in vendor/bin.

  • When running in CMD window, "call vendor\bin\dep" runs the dep.bat Windows batch file.
  • When running in bash shell, "vendor/bin/dep" runs the dep (no extension) shell script file

Can it connect to remote SSH and do some tasks in windows 8 ? Please let me know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

minkbear picture minkbear  ·  4Comments

exts picture exts  ·  3Comments

k-solnushkin picture k-solnushkin  ·  5Comments

dima-stefantsov picture dima-stefantsov  ·  5Comments

dgoujard picture dgoujard  ·  5Comments