obm/Makefile

28 lines
358 B
Makefile

.PHONY: build test lint clean fmt vet
BINARY := obm
VERSION := 0.1.0
LDFLAGS := -ldflags "-s -w -X main.version=$(VERSION)"
build:
go build $(LDFLAGS) -o $(BINARY) ./cmd/obm
test:
go test -v -race ./...
lint: vet fmt
@echo "lint: ok"
vet:
go vet ./...
fmt:
gofmt -l -s -w .
clean:
rm -f $(BINARY)
run: build
./$(BINARY)
all: lint test build