BINARY := gitflow
MODULE := gitea.oblak.solutions/dimitar/gitFlow
VERSION ?= dev
LDFLAGS := -ldflags "-X $(MODULE)/internal/version.Version=$(VERSION)"

.PHONY: build test fmt vet lint install clean

## build: compile the gitflow binary into the repo root
build:
	go build $(LDFLAGS) -o $(BINARY) ./cmd/gitflow

## test: run the full test suite
test:
	go test ./...

## fmt: format all Go sources
fmt:
	gofmt -l -w .

## vet: run go vet over all packages
vet:
	go vet ./...

## lint: run golangci-lint (requires golangci-lint on PATH)
lint:
	golangci-lint run

## install: install gitflow into GOBIN
install:
	go install $(LDFLAGS) ./cmd/gitflow

## clean: remove build artifacts
clean:
	rm -f $(BINARY)
	rm -f coverage.out
