This commit is contained in:
13
Makefile
13
Makefile
@@ -1,28 +1,21 @@
|
||||
.PHONY: up down run-server run-cli test
|
||||
.PHONY: up down run test
|
||||
|
||||
GOFILES=$(shell find . -name '*.go' -o -name 'go.*')
|
||||
STATICFILES=$(shell find . -name '*.js' -o -name '*.css' -o -name '*.html')
|
||||
SQLFILES=$(shell find . -name '*.sql')
|
||||
|
||||
ifneq (,$(wildcard ./local.properties))
|
||||
include local.properties
|
||||
export
|
||||
endif
|
||||
|
||||
build: server cli
|
||||
build: server
|
||||
|
||||
run-server: build
|
||||
run: build
|
||||
./server
|
||||
|
||||
run-cli: build
|
||||
./cli
|
||||
|
||||
server: $(GOFILES) $(STATICFILES)
|
||||
go build -o server ./cmd/serve
|
||||
|
||||
cli: $(GOFILES) $(SQLFILES)
|
||||
go build -o cli ./cmd/cli
|
||||
|
||||
test:
|
||||
go test ./... -cover
|
||||
|
||||
|
Reference in New Issue
Block a user