walsync 0.1.0

Lightweight SQLite WAL sync to S3/Tigris
.PHONY: build release test test-integration test-all clean install dev check fmt lint publish help

# Default target
all: build

# Build debug version
build:
	cargo build

# Build release version
release:
	cargo build --release

# Run unit tests
test:
	cargo test

# Run integration tests (requires S3/Tigris credentials)
test-integration:
	cargo test -- --ignored

# Run all tests (unit + integration)
test-all:
	cargo test
	cargo test -- --ignored

# Run tests with output
test-verbose:
	cargo test -- --nocapture

# Clean build artifacts
clean:
	cargo clean

# Install locally
install: release
	cargo install --path .

# Development mode - watch and rebuild
dev:
	cargo watch -x build

# Check for errors without building
check:
	cargo check

# Format code
fmt:
	cargo fmt

# Check formatting
fmt-check:
	cargo fmt -- --check

# Run clippy linter
lint:
	cargo clippy -- -D warnings

# Publish to crates.io
publish:
	cargo publish

# Bump version (requires cargo-edit: cargo install cargo-edit)
bump-patch:
	cargo set-version --bump patch

bump-minor:
	cargo set-version --bump minor

bump-major:
	cargo set-version --bump major

help:
	@echo "Available targets:"
	@echo ""
	@echo "  Build:"
	@echo "    make build     - Build debug binary"
	@echo "    make release   - Build release binary"
	@echo "    make install   - Install locally"
	@echo ""
	@echo "  Test:"
	@echo "    make test           - Run unit tests"
	@echo "    make test-integration - Run integration tests (requires S3 credentials)"
	@echo "    make test-all       - Run all tests"
	@echo "    make test-verbose   - Run tests with output"
	@echo ""
	@echo "  Code Quality:"
	@echo "    make check     - Check for errors"
	@echo "    make fmt       - Format code"
	@echo "    make lint      - Run clippy linter"
	@echo ""
	@echo "  Publish:"
	@echo "    make publish   - Publish to crates.io"
	@echo ""
	@echo "  Other:"
	@echo "    make clean     - Remove build artifacts"
	@echo "    make dev       - Watch and rebuild"

.DEFAULT_GOAL := help