/my-ddev-commands

A set of global DDEV commands to help streamline my workflow

Primary LanguagePHP

A set of custom DDEV commands I use regularly.

I want to use stow to manage these, so I can store just my custom commands in the git repo and they get symlinked to DDEV.

stow --target=$HOME/.ddev/commands .

Warning

Unfortunately that isn't currently supported, so for now I have to use hard links. I've written a script to handle that for me.

The script first deletes all old hard links in $HOME/.ddev/commands, then creates new hard links from any files not in the .links-ignore list. Finally it creates a symlink for the .php-utils/ directory since that doesn't get copied anywhere.

./make-links.sh

Installation

  1. clone the repo somewhere

  2. run the above command to make the links

  3. run composer install in .php-utils/

    cd .php-utils
    composer install
  4. create a /.php-utils/config.yml file:

    # Path that projects created with `ddev create` will live in
    projects_path: "~/projects"
    # Path that `ddev clone` will clone into
    clone_dir: "~/dump/temp"
    # Token used for github API when fetching PR info
    github_token: "YOUR_TOKEN_HERE"
    # Token shared with Composer (e.g. when installing forks)
    composer_token: "YOUR_TOKEN_HERE"
  5. enjoy.

Note

You may need to run ddev start or ddev debug fix-commands on any projects that were already running.