default: help
help:
	@echo "Please use \`make <target>' where <target> is one of:"
	@echo "  help             to show this message"
	@echo "  build            to build the collection tarball"
	@echo "  install          to build and install locally"
	@echo "  sanity           to run ansible-test sanity (podman)"
	@echo "  clean            to remove temporary build files"

build:
	ansible-galaxy collection build --force .

install: build
	ansible-galaxy collection install --force *.tar.gz

sanity:
	podman run -it --rm -v $$PWD:/ansible_collections/jugasit/libvirt -w /ansible_collections/jugasit/libvirt python:3.11 bash -c "pip install -r requirements-dev.txt ; ansible-test sanity --python=3.11"

clean:
	rm -rf *.tar.gz

.PHONY: help build install sanity clean
