28 lines
460 B
Makefile
28 lines
460 B
Makefile
.PHONY: all install clean swagger docker play
|
|
|
|
SWAG ?= ~/go/bin/swag
|
|
|
|
TARGET := $(shell find . -type f -name '*.go')
|
|
DEST := server/docs
|
|
|
|
all: swagger docker install
|
|
|
|
docker: game
|
|
docker compose up -d --force-recreate --build backend
|
|
|
|
install:
|
|
CGO_ENABLED=0 go install
|
|
|
|
game: $(TARGET)
|
|
CGO_ENABLED=0 go build -o $@
|
|
|
|
swagger:
|
|
$(SWAG) fmt
|
|
$(SWAG) init -o $(DEST) -g cmd/serve/backend.go -pdl 1
|
|
|
|
clean:
|
|
-rm -f game
|
|
|
|
play:
|
|
game play http://localhost:8081
|