.PHONY: setup build build-pro test test-pro sync clean

# --- Community ---

setup:
	git config core.hooksPath .githooks
	npm install
	@echo "Git hooks configured and dependencies installed."

build:
	cargo build
	npm run build

test:
	npm run test:all

# --- Commercial ---

build-pro:
	cargo build --features pro
	npm run build
	@echo "For Tauri release: cargo tauri build -- --features pro --config src-tauri/tauri.conf.commercial.json"

test-pro:
	cargo test --features pro
	AGOR_EDITION=pro npx vitest run

# --- Maintenance ---

sync:
	git fetch origin
	git merge origin/main

clean:
	cargo clean
	rm -rf node_modules/.vite
