gvp stands for Go Versioning Packager and is based on gst a similar tool that provides dependency isolation for Ruby gems.
The tool modifies your
GOPATH to point to a local
.godeps/ directory so that you can keep the dependencies of your project isolated there, it also modifies
PATH to include the new
gvp is a companion tool to gpm but both tools can be used independently from each other.
gpm + gvp:Example usage: Go Dependency Management and Vendoring with
Install in *nix (preferred method)
$ git clone https://github.com/pote/gvp.git && cd gvp $ git checkout v0.2.1 # You can ignore this part if you want to install HEAD. $ ./configure $ make install
Install via Homebrew
$ brew install gvp
gvp is a script and runs in a child environment of your shell, the latter will not take the env changes unless you
$ source gvp
gvp has been sourced, these commands are available:
usage: gvp [COMMAND] [...] COMMANDS source gvp Modifies GOPATH and GOBIN to use the .godeps directory. gvp version Outputs version information. gvp help Prints this message. gvp in The function that is called when executing "source gvp" gvp out Return the prompt to normal
cd /path/to/project touch .env echo "source /path/to/gvp" > .env
The way gvp plugin work is simple: whenever an unknown command is passed into gvp it will look for an executable in your $PATH called gvp- and if it exists it will run it while passing all extra arguments to it, simple yet powerful.
This brings a lot to the table: plugins can be written in anything, they can be Go binaries, bash scripts, Ruby gems, Python packages, you name it. gvp wants to make it easy for you to extend it. :)
Dependencies of multiple Go projects are by far easier to handle in isolation, using plain gpm to handle your dependencies means that you are forced to run it again every time you work on a new project, this can get old quickly.
gvp can greatly simplify your workflow, by isolating your Go project dependencies you only need to run
in order to be back in the work environment of your application, this means that there will never be Go packages installed in
your system which will conflict in versioning across your different projects.
If for some reason you need to ship your repository with its dependencies included this is also of help, but including a
Godeps file to use with gpm will probably be your best option.