rsmount 0.2.2

Safe Rust wrapper around the `util-linux/libmount` C library
Documentation
FIGURES =$(wildcard assets/diagrams/namespaces/d2/*.d2)
SVG_OUTPUT_DIR = assets/diagrams/svg

# Build the library
all:
	cargo build

# Spell-check source code
spell-check:
	@echo "Spell-checking source files..."
	@typos --exclude '*.svg' --exclude 'third-party/' --exclude 'web-snapshots/'

# Lint crate API changes for semver violations
semver-check:
	cargo semver-checks

# Build figures and diagrams
build-figs: $(FIGURES)
	./scripts/build-diagrams --output $(SVG_OUTPUT_DIR) $?

# Build the library documentation
doc:
	cargo doc --no-deps -p rsmount-sys -p rsmount

# Rebuild documentation and diagrams
doc-rebuild: build-figs doc

# Publish crate to crates.io
do-publish: build-figs
    cargo publish

# Dry run cargo publish
publish: test-all spell-check doc-rebuild semver-check
    cargo publish --dry-run

# Run unit/integration tests
test:
	cargo nextest run

# Run doc tests
test-doc:
	cargo test --doc

# Run all tests
test-all: test test-doc