This repository has been archived by the owner. It is now read-only.
A go1.5+ dependencies manager.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/godm
exec
git
vendor/github.com
.gitignore
.gitmodules
.travis.yml
LICENSE
README.md
file_system.go
godm_bash_autocomplete.bash
gosweep.sh
imports_extractor.go
imports_extractor_test.go
project.go
project_git.go
project_git_test.go
project_novcl.go
project_novcl_test.go
project_test.go
set.go
vendor.go

README.md

godm

A go1.5+ dependencies manager. Build Status GoDoc Coverage Status

More precisely, a tool to manage your project's dependencies by vendoring them at pinpointed versions.

It relies on the "GO15VENDOREXPERIMENT", so that other people (users and developers) can simply go get your project without being forced to use godm or any other tool that doesn't come with Go right out of the box.

If you wish to see how does a project using godm looks, well you got one right here :)

Vendors are there as Git submodules

Table of Contents

Table of Contents generated with DocToc

Status

Still in very early development.

Dependencies

Go 1.5+ (with GO15VENDOREXPERIMENT=1), and Git (available in your $PATH)

Installation

# If you haven't already, enable the Go 1.5 vendor experiment (personally that line is in my ~/.bashrc).
export GO15VENDOREXPERIMENT=1
# Then it's a simple go get.
go get github.com/hectorj/godm/cmd/godm

Upgrade

go get -u github.com/hectorj/godm/cmd/godm

Usage

Note : does not support Mercurial yet

help

Auto-generated help is available like this :

godm --help

(thanks to https://github.com/codegangsta/cli)

vendor

The vendor sub-command vendors imports that are not vendored yet in the current project. Outputs the import paths of vendors successfully added.

# Go to your package directory, wherever that is.
cd $GOPATH/src/myPackage
# Run it.
godm vendor
# If everything went well, you have new git submodules you can commit.
git commit -m "Vendoring done by godm"

clean

The clean sub-command removes vendors that are not imported in the current project. Outputs the import paths of vendors successfully removed.

# Go to your package directory, wherever that is.
cd $GOPATH/src/myPackage
# Run it.
godm clean
# If everything went well, you may have some Git submodules removals you can commit.
git commit -m "Vendors cleaning done by godm"

remove

The remove sub-command unvendors an import path. Takes a single import path as argument.

# Go to your package directory, wherever that is.
cd $GOPATH/src/myPackage
# Run godm
godm remove github.com/my/import/path
# If everything went well, you have a Git submodule removal you can commit.
git commit -m "Unvendoring done by godm"

Bash Autocompletion

Copy godm_bash_autocomplete.bash to /etc/bash_completion.d/ to get command autocompletion (highly recommended)

Migrating from another dependencies management tool

Godep

godep restore
GOPATH=`godep path`:$GOPATH godm save

Once you have checked the migration went well, you can eventually rm -rf ./Godeps