Skip to content

Commit 6094aa1

Browse files
committed
remove make docs from Makefile path check
1 parent f137e98 commit 6094aa1

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

Makefile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@
77
collection := $(notdir $(realpath $(CURDIR) ))
88
namespace := $(notdir $(realpath $(CURDIR)/.. ))
99
toplevel := $(notdir $(realpath $(CURDIR)/../..))
10-
1110
err_msg := Place collection at <WHATEVER>/ansible_collections/paloaltonetworks/panos
12-
ifneq (panos,$(collection))
13-
$(error $(err_msg))
14-
else ifneq (paloaltonetworks,$(namespace))
15-
$(error $(err_msg))
16-
else ifneq (ansible_collections,$(toplevel))
17-
$(error $(err_msg))
11+
12+
# List of targets that require path check
13+
PATH_CHECK_TARGETS := old-sanity new-sanity
14+
15+
# Check if current target requires path check
16+
ifneq ($(filter $(MAKECMDGOALS),$(PATH_CHECK_TARGETS)),)
17+
ifneq (panos,$(collection))
18+
$(error $(err_msg))
19+
else ifneq (paloaltonetworks,$(namespace))
20+
$(error $(err_msg))
21+
else ifneq (ansible_collections,$(toplevel))
22+
$(error $(err_msg))
23+
endif
1824
endif
1925

2026
python_version := $(shell \
@@ -32,7 +38,7 @@ docs: ## Build collection documentation
3238
rm -rf docs/html
3339
rm -rf docs/source/modules
3440
mkdir antsibull
35-
poetry run antsibull-docs collection --use-current --dest-dir antsibull --no-indexes paloaltonetworks.panos
41+
antsibull-docs collection --use-current --dest-dir antsibull --no-indexes paloaltonetworks.panos
3642
mkdir -p docs/source/modules
3743
mv antsibull/collections/paloaltonetworks/panos/* docs/source/modules
3844
rm -rf antsibull

0 commit comments

Comments
 (0)