2016-09-05 21:58:49 +00:00
|
|
|
.PHONY: build
|
|
|
|
|
|
|
|
all: build
|
2016-08-10 05:15:44 +00:00
|
|
|
|
|
|
|
.prefix:
|
|
|
|
ifeq ($(OS), Windows_NT)
|
|
|
|
if not exist build mkdir build
|
|
|
|
else
|
|
|
|
mkdir -p build
|
|
|
|
endif
|
|
|
|
|
2016-09-05 21:58:49 +00:00
|
|
|
build: .prefix
|
2016-09-04 05:13:42 +00:00
|
|
|
ifeq ($(OS), Windows_NT)
|
2016-09-05 21:58:49 +00:00
|
|
|
go build -o build/kolide.exe
|
2016-09-04 05:13:42 +00:00
|
|
|
else
|
2016-09-05 21:58:49 +00:00
|
|
|
go build -o build/kolide
|
2016-09-04 05:13:42 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
test:
|
|
|
|
go vet $(shell glide nv)
|
2016-09-05 21:58:49 +00:00
|
|
|
go test -v -cover $(shell glide nv)
|
2016-09-06 18:41:16 +00:00
|
|
|
npm run test
|
2016-09-04 05:13:42 +00:00
|
|
|
|
2016-08-10 05:15:44 +00:00
|
|
|
generate: .prefix
|
2016-08-19 00:45:39 +00:00
|
|
|
go-bindata -pkg=server -o=server/bindata.go frontend/templates/ build/
|
2016-09-06 15:08:11 +00:00
|
|
|
$(shell npm bin)/webpack --progress --colors --bail
|
|
|
|
|
|
|
|
generate-dev: .prefix
|
|
|
|
go-bindata -debug -pkg=server -o=server/bindata.go frontend/templates/ build/
|
2016-09-06 15:23:33 +00:00
|
|
|
$(shell npm bin)/webpack --progress --colors --bail --watch
|
2016-08-10 05:15:44 +00:00
|
|
|
|
|
|
|
deps:
|
|
|
|
npm install
|
2016-08-13 21:49:19 +00:00
|
|
|
go get -u github.com/Masterminds/glide
|
2016-08-10 15:31:27 +00:00
|
|
|
go get -u github.com/jteeuwen/go-bindata/...
|
2016-08-13 21:49:19 +00:00
|
|
|
glide install
|
2016-08-10 05:15:44 +00:00
|
|
|
|
2016-08-10 15:31:27 +00:00
|
|
|
distclean:
|
2016-08-10 05:15:44 +00:00
|
|
|
rm -rf build/*
|
2016-08-13 21:49:19 +00:00
|
|
|
rm -rf vendor/*
|
2016-08-10 05:15:44 +00:00
|
|
|
|
2016-08-25 13:25:02 +00:00
|
|
|
docker:
|
2016-09-05 21:58:49 +00:00
|
|
|
docker pull kolide/kolide-builder:1.7
|
|
|
|
docker run --rm -it -v $(shell pwd):/go/src/github.com/kolide/kolide-ose -v ${GOPATH}/pkg:/go/pkg kolide/kolide-builder:1.7 -B
|
2016-08-25 13:25:02 +00:00
|
|
|
docker-compose up
|