David Ashby
315fb4e9d2
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #17 Co-authored-by: David Ashby <delta.mu.alpha@gmail.com> Co-committed-by: David Ashby <delta.mu.alpha@gmail.com>
35 lines
585 B
Makefile
35 lines
585 B
Makefile
.PHONY: up down run-server run-cli 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
|
|
|
|
run-server: 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
|
|
|
|
# dev dependencies
|
|
up:
|
|
docker-compose up -d
|
|
|
|
down:
|
|
docker-compose down
|