diff --git a/Makefile b/Makefile index 78c3e71f6..2c8fd4fa5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ -.PHONY: glide vendor-update docker pilosa crossbuild install generate +.PHONY: glide vendor-update docker pilosa crossbuild install generate statik GLIDE := $(shell command -v glide 2>/dev/null) +STATIK := $(shell command -v statik 2>/dev/null) PROTOC := $(shell command -v protoc 2>/dev/null) VERSION := $(shell git describe --tags 2> /dev/null || echo unknown) IDENTIFIER := $(VERSION)-$(GOOS)-$(GOARCH) @@ -26,7 +27,7 @@ glide.lock: glide glide.yaml vendor-update: glide.lock -test: vendor +test: vendor generate go test $(shell cd $(GOPATH)/src/$(CLONE_URL); go list ./... | grep -v vendor) pilosa: vendor @@ -46,9 +47,14 @@ endif go build -o .protoc-gen-gofast ./vendor/github.com/gogo/protobuf/protoc-gen-gofast cp ./.protoc-gen-gofast $(GOPATH)/bin/protoc-gen-gofast -generate: .protoc-gen-gofast +generate: .protoc-gen-gofast statik go generate github.com/pilosa/pilosa/internal +statik: +ifndef STATIK + go install github.com/rakyll/statik +endif + docker: docker build -t "pilosa:$(VERSION)" \ --build-arg ldflags="-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME)" . diff --git a/glide.yaml b/glide.yaml index b70957c75..c453a7cae 100644 --- a/glide.yaml +++ b/glide.yaml @@ -31,5 +31,5 @@ import: - package: github.com/spf13/viper - package: github.com/gorilla/mux version: ^1.3.0 -- name: github.com/rakyll/statik +- package: github.com/rakyll/statik version: 274df120e9065bdd08eb1120e0375e3dc1ae8465