Skip to content

Commit

Permalink
Refactor to store common code in separate repo (#37)
Browse files Browse the repository at this point in the history
* Add default GOPATH

We should use go env as base in future

* Refactor

* Migrate to go dep

* Remove submodules

* Cleaning

* Add missing def
  • Loading branch information
sapk committed Mar 22, 2018
1 parent 0c833d4 commit bc95f6b
Show file tree
Hide file tree
Showing 52 changed files with 2,854 additions and 422 deletions.
63 changes: 0 additions & 63 deletions .gitmodules

This file was deleted.

174 changes: 174 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
branch = "master"
name = "github.com/docker/go-plugins-helpers"

[[constraint]]
branch = "master"
name = "github.com/sapk/docker-volume-helpers"

[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.0.5"

[[constraint]]
name = "github.com/spf13/cobra"
version = "0.0.1"

[[constraint]]
name = "github.com/spf13/viper"
version = "1.0.2"

[prune]
go-tests = true
unused-packages = true
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ NO_COLOR=\033[0m
OK_COLOR=\033[32;01m
WARN_COLOR=\033[33;01m

GOPATH ?= $(HOME)/go

all: build compress done

Expand Down Expand Up @@ -164,28 +165,25 @@ dev-deps:
@echo -e "$(OK_COLOR)==> Installing developement dependencies...$(NO_COLOR)"
@go get github.com/nsf/gocode
@go get github.com/alecthomas/gometalinter
@go get github.com/dpw/vendetta #Vendoring
@go get github.com/golang/dep/cmd/dep #Vendoring
@go get github.com/wadey/gocovmerge
@$(GOPATH)/bin/gometalinter --install > /dev/null

update-dev-deps:
@echo -e "$(OK_COLOR)==> Installing/Updating developement dependencies...$(NO_COLOR)"
go get -u github.com/nsf/gocode
go get -u github.com/alecthomas/gometalinter
go get -u github.com/dpw/vendetta #Vendoring
go get -u github.com/golang/dep/cmd/dep #Vendoring
go get -u github.com/wadey/gocovmerge
$(GOPATH)/bin/gometalinter --install --update

deps:
@echo -e "$(OK_COLOR)==> Installing dependencies ...$(NO_COLOR)"
@git submodule update --init --recursive
# @$(GOPATH)/bin/vendetta -n $(APP_PACKAGE)
# @go get -d -v ./...
@$(GOPATH)/bin/dep ensure

update-deps: dev-deps
@echo -e "$(OK_COLOR)==> Updating all dependencies ...$(NO_COLOR)"
$(GOPATH)/bin/vendetta -n $(APP_PACKAGE) -u
#@go get -d -v -u ./...
$(GOPATH)/bin/dep ensure -update


done:
Expand Down
Loading

0 comments on commit bc95f6b

Please sign in to comment.