Files
jellybit/Makefile
T

29 lines
646 B
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
BINARY := jellybit
PKG := ./cmd/jellybit
.PHONY: build run test lint tidy image clean
# Статический бинарь для сервера (Intel N150 = linux/amd64).
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags='-s -w' -o $(BINARY) $(PKG)
# Локальный запуск (нужен ./config.toml с db_path -> ./jellybit.db).
run:
go run $(PKG) --config ./config.toml
test:
go test ./...
lint:
golangci-lint run
tidy:
go mod tidy
# Образ из уже собранного бинаря (см. docs/adr docker-deploy).
image: build
docker build -t jellybit:dev .
clean:
rm -f $(BINARY)