.DEFAULT_GOAL := help

help:
	@echo ""
	@echo "Available tasks:"
	@echo "    make release    Build and release new version [deprecated]"
	@echo ""

release:
	perl -i -pe "s/(version:\s\d\.\d\.)(\d+)/\$$1.(\$$2+1)/e" ./galaxy.yml
	ansible-galaxy collection build
	ansible-galaxy collection publish ./$$(ls pyurkin-host-*.tar.gz | sort -V | tail -n1)
	rm -rf ./$$(ls pyurkin-host-*.tar.gz)

.PHONY: help release
