-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (54 loc) · 1.98 KB
/
Copy pathMakefile
File metadata and controls
67 lines (54 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.PHONY: clean clean-test clean-pyc clean-build docs help
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . \( -path ./env -o -path ./venv -o -path ./.env -o -path ./.venv \) -prune -o -name '*.egg-info' -exec rm -fr {} +
find . \( -path ./env -o -path ./venv -o -path ./.env -o -path ./.venv \) -prune -o -name '*.egg' -exec rm -f {} +
clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test: ## remove test and coverage artifacts
rm -f .coverage
rm -f coverage.xml
rm -f coverage.lcov
rm -fr htmlcov/
rm -fr .pytest_cache
rm -fr .ruff_cache
find . -name '.mypy_cache' -exec rm -fr {} +
code-format:
ruff check --select I --fix --exclude .venv
ruff format --exclude .venv
setup-devcontainer:
poetry sync --all-extras
eval $(poetry env activate)
test:
pytest --cov=tmconfpy tests/
coverage html
coverage lcov
coverage xml
coverage report -m
tests: test
ansible:
cp -f tmconfpy/parser.py ansible_collections/simonkowallik/tmconfpy/plugins/module_utils/parser.py
cp -f LICENSE ansible_collections/simonkowallik/tmconfpy/LICENSE
mkdir -p ./build
ansible-galaxy collection build ansible_collections/simonkowallik/tmconfpy --output-path build/
echo 'ansible-galaxy collection publish build/simonkowallik-tmconfpy-*.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY'
container:
docker build -t tmconfpy .
publish-test-pypi: dist
# poetry config repositories.test-pypi https://test.pypi.org/legacy/
# poetry config pypi-token.test-pypi $(TOKEN)
poetry publish -r test-pypi
publish-pypi: dist
# poetry config repositories.pypi https://test.pypi.org/legacy/
# poetry config pypi-token.pypi $(TOKEN)
poetry publish -r pypi
dist: clean ## builds source and wheel package
poetry build
ls -l dist
tar tzf dist/*.tar.gz