2025-11-16 11:37:02 +05:30
|
|
|
.PHONY: run bench-select test build install
|
|
|
|
|
|
|
|
|
|
# Version can be set via: make build VERSION=v1.2.3
|
|
|
|
|
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
2025-10-21 00:27:00 +05:30
|
|
|
|
2025-07-26 18:34:56 +05:30
|
|
|
run:
|
2025-10-18 14:43:42 +05:30
|
|
|
go run ./cmd -o ./playground/db ./playground/schema.sql
|
2025-11-02 22:04:02 +05:30
|
|
|
|
2025-07-26 18:34:56 +05:30
|
|
|
bench-select:
|
2025-11-02 22:04:02 +05:30
|
|
|
go test ./playground -bench BenchmarkSelect -memprofile memprofile.out -cpuprofile profile.out
|
2025-08-10 20:26:09 +05:30
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
go test ./playground
|
2025-11-16 11:37:02 +05:30
|
|
|
|
|
|
|
|
# Build with version information
|
|
|
|
|
build:
|
|
|
|
|
go build -ldflags "-X main.version=$(VERSION)" -o pgm ./cmd
|
|
|
|
|
|
|
|
|
|
# Install to GOPATH/bin with version
|
|
|
|
|
install:
|
|
|
|
|
go install -ldflags "-X main.version=$(VERSION)" ./cmd
|
|
|
|
|
|
|
|
|
|
# Show current version
|
|
|
|
|
version:
|
|
|
|
|
@echo "Version: $(VERSION)"
|