Files
gitlocal/Makefile
T
dtomlinson 4155d78440 Switches to native Go build info for versioning
Simplifies the version command and Makefile by removing manual ldflags injection. The application now relies entirely on Go's built-in VCS metadata embedding to extract version, commit, and date information, ensuring accurate reporting across all build methods.
2026-04-11 15:06:11 +01:00

28 lines
537 B
Makefile

.PHONY: build install test coverage clean
# Build the binary (Go automatically embeds VCS info)
build:
@echo "Building gitlocal..."
go build -o gitlocal .
# Install to $GOPATH/bin
install:
@echo "Installing gitlocal..."
go install .
# Run tests
test:
@echo "Running tests..."
go test -v ./...
# Run tests with coverage
coverage:
@echo "Running tests with coverage..."
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
# Clean build artifacts
clean:
@echo "Cleaning..."
rm -f gitlocal coverage.out