Drush version manager (DVM)
Drush version control system, to manage a variety of Drush versions and provide the ability to switch to specific versions at any time.
This project was inspired by NVM
, and was originally written in Bash. It was rewritten in Go in late-2016 and has been improving since.
It came about when attempting to use multiple Drush versions with the use of CI tooling. It has become more important now as Drupal has essentially abandoned the use of drush make
.
Drush version manager requires composer, and nothing more.
There are three ways to install DVM, but if you're at all familiar with Golang these are very standardised shipping methods.
Option 1: Like any other Go binary
go get -u github.com/fubarhouse/dvm
Option 2: Download a precompiled binary!
$PATH
environment variable.Option 3: - As an API for use in your Go project
go get -u github.com/fubarhouse/dvm
Configurations are loaded via Viper, an example is below.
The default symlink path is $HOME/.dvm/bin/drush
. The default value can be overriden in ~/.dvm/config.toml
to suit your environment.
[config]
path = "/usr/local/bin/drush"
Usage:
dvm [command] [flags]
Available Commands:
help Help about any command
install Install a specific version of Drush
list List available or installed Drush versions.
reinstall Reinstall a specific version of Drush
search Search for available Drush versions using a substring.
uninstall Uninstall a specific version of Drush
use Initialise or replace an established symlink to the configured location, for a given version of Drush
Flags:
--config string config file (default is $HOME/config.toml)
-a, --available List available versions
-h, --help help for dvm
-i, --installed List installed versions
-v, --version string Version to target, it does not have a default value.
dvm install --version 7.2.0
dvm uninstall --version 7.2.0
dvm reinstall --version 7.2.0
dvm use --version 7.2.0
dvm list --available
dvm list --installed
dvm search -s ^9
dvm search -s 9$
dvm search -s 9