Skip to content

Commit

Permalink
Added git submodules for vendor'd depenencies
Browse files Browse the repository at this point in the history
Some improvements to Makefile (namely embedded GOPATH)
Allow building for Go1.6
Minor formatting fixes, bumped version to 0.2.4
Do not ignore file.Close() error
Allow --verbose on init
  • Loading branch information
gdm85 committed Mar 1, 2016
1 parent 09cf52f commit fea30a3
Show file tree
Hide file tree
Showing 12 changed files with 191 additions and 126 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1 +1,3 @@
bin/docker-fw

.gopath/
6 changes: 6 additions & 0 deletions .gitmodules
@@ -0,0 +1,6 @@
[submodule "vendor/github.com/fsouza/go-dockerclient"]
path = vendor/github.com/fsouza/go-dockerclient
url = https://github.com/fsouza/go-dockerclient
[submodule "vendor/github.com/pborman/getopt"]
path = vendor/github.com/pborman/getopt
url = https://github.com/pborman/getopt
25 changes: 14 additions & 11 deletions Makefile
@@ -1,15 +1,18 @@
bin/docker-fw:
mkdir -p bin .gopath
if [ ! -L .gopath/src ]; then ln -s "$(CURDIR)/vendor" .gopath/src; fi
cd src && GOBIN="$(CURDIR)/bin/" GOPATH="$(CURDIR)/.gopath" go install && mv ../bin/src ../bin/docker-fw

.DEFAULT_GOAL := all
all: bin/docker-fw errcheck test

.PHONY := all deps
errcheck:
mkdir -p bin .gopath
if [ ! -L .gopath/src ]; then ln -s "$(CURDIR)/vendor" .gopath/src; fi
cd src && GOPATH="$(CURDIR)/.gopath" errcheck

all: deps bin/docker-fw
test:
mkdir -p bin .gopath
if [ ! -L .gopath/src ]; then ln -s "$(CURDIR)/vendor" .gopath/src; fi
cd src && GOPATH="$(CURDIR)/.gopath" go test -v

deps:
go get "github.com/fsouza/go-dockerclient"
go get "github.com/pborman/getopt"

## build without debug information
bin/docker-fw: *.go
mkdir -p bin
GOBIN=bin go install -ldflags "-w -s"
.PHONY: all deps test errcheck bin/docker-fw

0 comments on commit fea30a3

Please sign in to comment.