2023-12-20 15:39:25 +00:00
|
|
|
// TODO: add commands for build and run in dev/produciton mode
|
|
|
|
|
|
|
|
ROOT=$(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
|
|
|
lint:
|
|
|
|
which golangci-lint || (go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.0)
|
|
|
|
golangci-lint run --config=$(ROOT)/.golangci.yml $(ROOT)/...
|
|
|
|
|
|
|
|
test:
|
|
|
|
go test -v ./...
|
|
|
|
|
|
|
|
format:
|
|
|
|
@which gofumpt || (go install mvdan.cc/gofumpt@latest)
|
|
|
|
@gofumpt -l -w $(ROOT)
|
|
|
|
@which gci || (go install github.com/daixiang0/gci@latest)
|
|
|
|
@gci write $(ROOT)
|
|
|
|
@which golangci-lint || (go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.0)
|
|
|
|
@golangci-lint run --fix
|
2024-01-11 07:13:37 +00:00
|
|
|
|
|
|
|
build:
|
2024-05-14 13:07:09 +00:00
|
|
|
go build main.go --migrate
|
|
|
|
|
|
|
|
run:
|
|
|
|
go run main.go --migrate
|
|
|
|
|
|
|
|
docker:
|
|
|
|
sudo docker compose up -d
|