Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage dependencies via Godep #1714

Merged
merged 3 commits into from
Feb 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this set of things / associated target is useful for people building for the first time. These aren't built into the binary so we don't want to vendor them, but they are Go-based tools used in the build process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, readded the tools target.

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