BINARY := runtimeclass-debugger
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS := -X main.version=$(VERSION)

.PHONY: all build test vet lint fmt clean

all: build

build:
	go build -ldflags '$(LDFLAGS)' -o bin/$(BINARY) ./cmd/runtimeclass-debugger

test:
	go test ./...

vet:
	go vet ./...

lint:
	golangci-lint run

fmt:
	gofmt -l .

clean:
	rm -rf bin
