generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
38 lines (31 loc) · 1.15 KB
/
Makefile
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
#!/usr/bin/make -f
.PHONY: install
install:
poetry install --no-root --with=dev
poetry run pre-commit install --install-hooks
.PHONY: update
clean:
poetry update
poetry run pre-commit autoupdate
.PHONY: lint
lint: collection-cleanup collection-prep
poetry run antsibull-changelog lint
poetry run ansible-lint --fix
# Assumes ansible-test is available in the global scope, such as within the devcontainer environment
.PHONY: sanity
sanity: collection-cleanup collection-prep
poetry run tests/run-sanity.sh
.PHONY: integration
integration: collection-cleanup collection-prep
poetry run tests/run-integration.sh
# Make a copy of the collection available in an expected Ansible path
# For running tooling in Codespaces or other environments
# If you get ansible-lint errors about unresolved modules in this collection,
# run this command then re-run ansible-lint.
.PHONY: collection-prep
collection-prep:
mkdir -p ~/.ansible/collections/ansible_collections/digitalocean/cloud
cp -r ./ ~/.ansible/collections/ansible_collections/digitalocean/cloud
.PHONY: collection-cleanup
collection-cleanup:
rm -rf ~/.ansible/collections/ansible_collections/digitalocean/cloud