2023-10-06 06:57:52 +13:00
|
|
|
.PHONY: clean virtualenv lint test docker dist dist-upload
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
find . -name '*.py[co]' -delete
|
|
|
|
|
|
|
|
|
|
virtualenv:
|
2023-10-08 22:03:52 +13:00
|
|
|
virtualenv --prompt '|> ansible-role-common <| ' .venv
|
|
|
|
|
.venv/bin/pip install --upgrade pip
|
|
|
|
|
.venv/bin/pip install -r requirements.txt
|
|
|
|
|
.venv/bin/ansible-galaxy collection install -r requirements.yml
|
2023-10-06 06:57:52 +13:00
|
|
|
@echo
|
2023-10-08 22:03:52 +13:00
|
|
|
@echo "VirtualENV Setup Complete. Now run: source .venv/bin/activate"
|
2023-10-06 06:57:52 +13:00
|
|
|
@echo
|
|
|
|
|
|
|
|
|
|
test:
|
2024-01-04 23:02:52 +13:00
|
|
|
for distro in almalinux9 ; do \
|
2023-10-06 06:57:52 +13:00
|
|
|
MOLECULE_DISTRO=$$distro molecule test --all ; \
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
lint:
|
2024-04-26 11:40:40 +12:00
|
|
|
@echo "Linting"
|
|
|
|
|
@act -j lint
|
2023-10-06 06:57:52 +13:00
|
|
|
@echo
|
|
|
|
|
|
|
|
|
|
docker: clean
|
|
|
|
|
docker buildx build --platform 'linux/amd64,linux/arm64' --push \
|
|
|
|
|
-t hub.cybercinch.nz/cybercinch/imap_retention_manager:latest \
|
|
|
|
|
-t docker.io/cybercinch/imap_retention_manager:latest .
|
|
|
|
|
|
|
|
|
|
dist: clean
|
|
|
|
|
rm -rf dist/*
|
|
|
|
|
python setup.py sdist
|
|
|
|
|
python setup.py bdist_wheel
|
|
|
|
|
|
|
|
|
|
dist-upload:
|
|
|
|
|
twine upload dist/*
|