|
34 | 34 | # First project is considered the primary one used for doc-validator.
|
35 | 35 | PRIMARY_PROJECT := $(subst /,-,$(firstword $(subst :, ,$(firstword $(PROJECTS)))))
|
36 | 36 |
|
37 |
| -# Name for the container. |
38 |
| -ifeq ($(origin DOCS_CONTAINER), undefined) |
39 |
| -export DOCS_CONTAINER := $(PRIMARY_PROJECT)-docs |
40 |
| -endif |
41 |
| - |
42 | 37 | # Host port to publish container port to.
|
43 | 38 | ifeq ($(origin DOCS_HOST_PORT), undefined)
|
44 | 39 | export DOCS_HOST_PORT := 3002
|
@@ -80,35 +75,35 @@ docs-pull: ## Pull documentation base image.
|
80 | 75 |
|
81 | 76 | make-docs: ## Fetch the latest make-docs script.
|
82 | 77 | make-docs:
|
83 |
| - if [[ ! -f "$(PWD)/make-docs" ]]; then |
| 78 | + if [[ ! -f "$(CURDIR)/make-docs" ]]; then |
84 | 79 | echo 'WARN: No make-docs script found in the working directory. Run `make update` to download it.' >&2
|
85 | 80 | exit 1
|
86 | 81 | fi
|
87 | 82 |
|
88 | 83 | .PHONY: docs
|
89 | 84 | docs: ## Serve documentation locally, which includes pulling the latest `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image. See also `docs-no-pull`.
|
90 | 85 | docs: docs-pull make-docs
|
91 |
| - $(PWD)/make-docs $(PROJECTS) |
| 86 | + $(CURDIR)/make-docs $(PROJECTS) |
92 | 87 |
|
93 | 88 | .PHONY: docs-no-pull
|
94 | 89 | docs-no-pull: ## Serve documentation locally without pulling the `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image.
|
95 | 90 | docs-no-pull: make-docs
|
96 |
| - $(PWD)/make-docs $(PROJECTS) |
| 91 | + $(CURDIR)/make-docs $(PROJECTS) |
97 | 92 |
|
98 | 93 | .PHONY: docs-debug
|
99 | 94 | docs-debug: ## Run Hugo web server with debugging enabled. TODO: support all SERVER_FLAGS defined in website Makefile.
|
100 | 95 | docs-debug: make-docs
|
101 |
| - WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug' $(PWD)/make-docs $(PROJECTS) |
| 96 | + WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug' $(CURDIR)/make-docs $(PROJECTS) |
102 | 97 |
|
103 | 98 | .PHONY: doc-validator
|
104 | 99 | doc-validator: ## Run doc-validator on the entire docs folder.
|
105 | 100 | doc-validator: make-docs
|
106 |
| - DOCS_IMAGE=$(DOC_VALIDATOR_IMAGE) $(PWD)/make-docs $(PROJECTS) |
| 101 | + DOCS_IMAGE=$(DOC_VALIDATOR_IMAGE) $(CURDIR)/make-docs $(PROJECTS) |
107 | 102 |
|
108 | 103 | .PHONY: vale
|
109 | 104 | vale: ## Run vale on the entire docs folder.
|
110 | 105 | vale: make-docs
|
111 |
| - DOCS_IMAGE=$(VALE_IMAGE) $(PWD)/make-docs $(PROJECTS) |
| 106 | + DOCS_IMAGE=$(VALE_IMAGE) $(CURDIR)/make-docs $(PROJECTS) |
112 | 107 |
|
113 | 108 | .PHONY: update
|
114 | 109 | update: ## Fetch the latest version of this Makefile and the `make-docs` script from Writers' Toolkit.
|
|
0 commit comments