Files
amane-tanikaze-dcbot/Makefile

28 lines
466 B
Makefile

.PHONY: all swagger docker install test sh
SWAG ?= ~/go/bin/swag
GO_ENV += CGO_ENABLED=0
TARGET := $(shell find . -type f -name '*.go')
all: swagger docker install
docker: amane
docker compose up -d --force-recreate --build backend
install:
$(GO_ENV) go install
test:
go test -v ./tests/units
swagger:
$(SWAG) fmt
$(SWAG) init -o handlers/docs -g cmd/backend.go -pdl 1
amane: $(TARGET)
$(GO_ENV) go build -o $@
sh:
docker compose exec -it backend sh