.PHONY: clean dist

APP_NAME = minimalprofile
VERSION = $$(cat appinfo/info.xml | grep -oP '<version>\K[^<]+' || echo "1.0.0")

dist: clean
	@echo "Creating $(APP_NAME) distribution..."
	@mkdir -p dist
	@tar -czf dist/$(APP_NAME).tar.gz \
		--exclude='.git' \
		--exclude='.gitignore' \
		--exclude='dist' \
		--exclude='*.log' \
		--transform 's|^|$(APP_NAME)/|' \
		.
	@echo "Created dist/$(APP_NAME).tar.gz"
	@ls -lh dist/

clean:
	@rm -rf dist/