2016-06-21 02:16:05 +02:00
|
|
|
dirs = ./interfaces/... ./commands/... ./services/... ./bot/... .
|
|
|
|
|
2014-12-14 01:05:15 +01:00
|
|
|
all: mumbledj
|
|
|
|
|
2016-06-21 02:16:05 +02:00
|
|
|
mumbledj: ## Default action. Builds MumbleDJ.
|
|
|
|
@env GO15VENDOREXPERIMENT="1" go build .
|
|
|
|
|
2016-06-22 04:01:21 +02:00
|
|
|
.PHONY: test
|
2016-06-21 02:16:05 +02:00
|
|
|
test: ## Runs unit tests for MumbleDJ.
|
2016-06-22 08:01:45 +02:00
|
|
|
@env GO15VENDOREXPERIMENT="1" go test $(dirs)
|
|
|
|
|
|
|
|
.PHONY: coverage
|
|
|
|
coverage: ## Runs coverage tests for MumbleDJ.
|
2016-06-22 04:31:16 +02:00
|
|
|
@env GO15VENDOREXPERIMENT="1" overalls -project=github.com/matthieugrieger/mumbledj -covermode=atomic
|
|
|
|
@mv overalls.coverprofile coverage.txt
|
2016-06-21 02:16:05 +02:00
|
|
|
|
2016-06-22 04:01:21 +02:00
|
|
|
.PHONY: clean
|
2016-06-21 02:16:05 +02:00
|
|
|
clean: ## Removes compiled MumbleDJ binaries.
|
|
|
|
@rm -f mumbledj*
|
|
|
|
|
2016-06-22 04:01:21 +02:00
|
|
|
.PHONY: install
|
2016-06-21 02:16:05 +02:00
|
|
|
install: ## Copies MumbleDJ binary to /usr/local/bin for easy execution.
|
|
|
|
@cp -f mumbledj* /usr/local/bin/mumbledj
|
|
|
|
|
2016-06-22 04:01:21 +02:00
|
|
|
.PHONY: dist
|
2016-06-21 02:16:05 +02:00
|
|
|
dist: ## Performs cross-platform builds via gox for multiple Linux platforms.
|
|
|
|
@go get -u github.com/mitchellh/gox
|
|
|
|
@gox -cgo -osarch="linux/amd64 linux/386"
|
|
|
|
|
2016-06-22 04:01:21 +02:00
|
|
|
.PHONY: bindata
|
2016-06-21 02:16:05 +02:00
|
|
|
bindata: ## Regenerates bindata.go with an updated configuration file.
|
|
|
|
@go get -u github.com/jteeuwen/go-bindata/...
|
|
|
|
@go-bindata config.yaml
|
|
|
|
|
2016-06-22 04:01:21 +02:00
|
|
|
.PHONY: help
|
2016-06-21 02:16:05 +02:00
|
|
|
help: ## Shows this helptext.
|
|
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|