Install statik in build process, fix glide.yaml

This commit is contained in:
Cody Soyland 2017-04-24 11:22:28 -05:00
parent 2163dc3829
commit 1cdbca1a1e
2 changed files with 10 additions and 4 deletions

View file

@ -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)" .

View file

@ -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