mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
66b54e2dbd
* Replace ambiguous relrefs with partial URIs to prevent 404s Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix local builds that depend on latest content Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix broken relref Signed-off-by: Jack Baldry <jack.baldry@grafana.com> --------- Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
29 lines
1.2 KiB
Makefile
29 lines
1.2 KiB
Makefile
.PHONY: pull docs docs-quick docs-no-pull docs-test docs-local-static
|
|
|
|
PODMAN = $(shell if command -v podman &>/dev/null; then echo podman; else echo docker; fi)
|
|
IMAGE = grafana/docs-base:latest
|
|
CONTENT_PATH = /hugo/content/docs/grafana/latest
|
|
LOCAL_STATIC_PATH = ../../website/static
|
|
PORT = 3002:3002
|
|
|
|
pull:
|
|
$(PODMAN) pull $(IMAGE)
|
|
|
|
docs: pull
|
|
$(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server"
|
|
|
|
docs-preview: pull
|
|
$(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server BUILD_DRAFTS=true"
|
|
|
|
docs-no-pull:
|
|
$(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) /bin/bash -c "make server"
|
|
|
|
docs-test: pull
|
|
$(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z --rm -it $(IMAGE) /bin/bash -c 'make prod'
|
|
|
|
# expects that you have grafana/website checked out in same path as the grafana repo.
|
|
docs-local-static: pull
|
|
if [ ! -d "$(LOCAL_STATIC_PATH)" ]; then echo "local path (website project) $(LOCAL_STATIC_PATH) not found"]; exit 1; fi
|
|
$(PODMAN) run -v $(shell pwd)/sources:$(CONTENT_PATH):Z \
|
|
-v $(shell pwd)/$(LOCAL_STATIC_PATH):/hugo/static:Z -p $(PORT) --rm -it $(IMAGE)
|