Skip to content

Commit

Permalink
Merge pull request #1714 from hashicorp/e-godeps
Browse files Browse the repository at this point in the history
Manage dependencies via Godep
  • Loading branch information
sean- committed Feb 13, 2016
2 parents 3eb3087 + 870cabf commit 8d55552
Show file tree
Hide file tree
Showing 1,106 changed files with 303,309 additions and 1,325 deletions.
34 changes: 11 additions & 23 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
GOTOOLS = github.com/mitchellh/gox golang.org/x/tools/cmd/stringer \
github.com/jteeuwen/go-bindata/... github.com/elazarl/go-bindata-assetfs/...
DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
PACKAGES = $(shell go list ./...)
PACKAGES=$(shell go list ./... | grep -v '^github.com/hashicorp/consul/vendor/')
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \
-nilfunc -printf -rangeloops -shift -structtags -unsafeptr
VERSION?=$(shell awk -F\" '/^const Version/ { print $$2; exit }' version.go)

all: deps format
all: format tools
@mkdir -p bin/
@bash --norc -i ./scripts/build.sh

Expand All @@ -26,30 +25,16 @@ cov:
gocov test ./... | gocov-html > /tmp/coverage.html
open /tmp/coverage.html

deps:
@echo "--> Installing build dependencies"
@go get -v $(GOTOOLS)
@go get -d -v ./... $(DEPS)

updatedeps: deps
go get -u -v $(GOTOOLS)
go list ./... \
| xargs go list -f '{{join .Deps "\n"}}' \
| grep -v github.com/hashicorp/consul \
| grep -v '/internal/' \
| sort -u \
| xargs go get -f -u -v

test: deps
test:
@$(MAKE) vet
@./scripts/verify_no_uuid.sh
@./scripts/test.sh

cover: deps
cover:
./scripts/verify_no_uuid.sh
go list ./... | xargs -n1 go test --cover

format: deps
format:
@echo "--> Running go fmt"
@go fmt $(PACKAGES)

Expand All @@ -65,21 +50,24 @@ vet:
fi

# generate runs `go generate` to build the dynamically generated source files
generate: deps
generate:
find . -type f -name '.DS_Store' -delete
go generate ./...

# generates the static web ui
static-assets: deps
static-assets:
@echo "--> Generating static assets"
@go-bindata-assetfs -pkg agent -prefix pkg ./pkg/web_ui/...
@mv bindata_assetfs.go command/agent
$(MAKE) format

tools:
go get -u -v $(GOTOOLS)

web:
./scripts/website_run.sh

web-push:
./scripts/website_push.sh

.PHONY: all bin dev dist cov deps test vet web web-push generate test-nodep static-assets
.PHONY: all bin dev dist cov test vet web web-push generate static-assets tools
71 changes: 58 additions & 13 deletions deps/v0-6-3.json → Godeps/Godeps.json

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

5 changes: 5 additions & 0 deletions Godeps/Readme

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

72 changes: 0 additions & 72 deletions deps/v0-3-0.json

This file was deleted.

72 changes: 0 additions & 72 deletions deps/v0-3-1.json

This file was deleted.

Loading

0 comments on commit 8d55552

Please sign in to comment.