Files
cybertron/Makefile

29 lines
634 B
Makefile
Raw Permalink Normal View History

2024-07-23 14:16:26 +05:30
.PHONY: clean all
all: fmt lint build-cybertron
run-local:
@bash ./scripts/run-local
setup:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
build-cybertron:
go mod tidy && CGO_ENABLED=1 go build -ldflags="-s -w" -o out/cybertron cmd/cybertron/main.go
build-migrations:
go mod tidy && CGO_ENABLED=1 go build -ldflags="-s -w" -o out/migrations cmd/migrations/main.go
clean:
rm -rf out/
rm -f *.out
lint:
golangci-lint run
fmt:
@echo "Running fmt..."
@for p in $(ALL_PACKAGES); do \
go fmt $$p | { grep -vwE "exported (var|function|method|type|const) \S+ should have comment" || true; } \
done