35 lines
585 B
Makefile
Raw Normal View History

.PHONY: up down run-server run-cli test
2021-06-26 14:08:35 -04:00
GOFILES=$(shell find . -name '*.go' -o -name 'go.*')
STATICFILES=$(shell find . -name '*.js' -o -name '*.css' -o -name '*.html')
SQLFILES=$(shell find . -name '*.sql')
2021-07-02 18:47:14 -04:00
ifneq (,$(wildcard ./local.properties))
include local.properties
export
endif
build: server cli
2021-06-26 14:08:35 -04:00
2021-07-06 21:40:12 -04:00
run-server: build
2021-07-02 18:47:14 -04:00
./server
run-cli: build
./cli
2021-07-06 21:40:12 -04:00
2021-06-26 14:08:35 -04:00
server: $(GOFILES) $(STATICFILES)
go build -o server ./cmd/serve
cli: $(GOFILES) $(SQLFILES)
go build -o cli ./cmd/cli
2021-06-26 14:08:35 -04:00
2021-07-13 18:32:01 -04:00
test:
go test ./... -cover
2021-07-02 18:47:14 -04:00
# dev dependencies
2021-06-26 14:08:35 -04:00
up:
docker-compose up -d
2021-06-26 14:08:35 -04:00
down:
docker-compose down