.PHONY: up down run test

GOFILES=$(shell find . -name '*.go' -o -name 'go.*')
STATICFILES=$(shell find . -name '*.js' -o -name '*.css' -o -name '*.html')

ifneq (,$(wildcard ./local.properties))
include local.properties
export
endif

build: server

run: build
	./server

server: $(GOFILES) $(STATICFILES)
	go build -o server ./cmd/serve

test:
	go test ./... -cover

# dev dependencies
up:
	docker-compose up -d

down:
	docker-compose down
