2017-04-03 06:16:21 +02:00
|
|
|
BINARY=sonic-server
|
2016-10-11 02:27:09 +02:00
|
|
|
|
2020-01-06 19:47:48 +01:00
|
|
|
build:
|
|
|
|
go build -x ${BINARY}
|
2016-10-11 02:27:09 +02:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f ${BINARY}
|
2017-04-03 06:16:21 +02:00
|
|
|
|
2016-10-11 02:27:09 +02:00
|
|
|
.PHONY: setup
|
|
|
|
setup:
|
2020-01-05 03:13:54 +01:00
|
|
|
@which reflex || (echo "Installing Reflex" && GO111MODULE=off go get -u github.com/cespare/reflex)
|
|
|
|
@which goconvey || (echo "Installing GoConvey" && GO111MODULE=off go get -u github.com/smartystreets/goconvey)
|
|
|
|
go mod download
|
2016-10-11 02:27:09 +02:00
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
run:
|
2020-01-05 03:13:54 +01:00
|
|
|
@reflex -s -r "\.go$$" -- go run .
|
2016-10-11 02:27:09 +02:00
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
2020-01-05 03:13:54 +01:00
|
|
|
BEEGO_RUNMODE=test go test ./... -v
|
2016-10-11 02:27:09 +02:00
|
|
|
|
|
|
|
.PHONY: convey
|
|
|
|
convey:
|
2020-01-05 03:13:54 +01:00
|
|
|
NOLOG=1 goconvey --port 9090 -excludedDirs static,devDb,wiki,bin,tests
|
2016-10-11 02:27:09 +02:00
|
|
|
|
|
|
|
.PHONY: cloc
|
|
|
|
cloc:
|
|
|
|
# cloc can be installed using brew
|
2020-01-05 03:13:54 +01:00
|
|
|
cloc --exclude-dir=devDb,.idea,.vscode,wiki,static --exclude-ext=iml,xml .
|