Skip to content

Commit

Permalink
Fix docs-related make targets so they run on MacOS
Browse files Browse the repository at this point in the history
Signed-off-by: Feilian Xie <[email protected]>
  • Loading branch information
fxierh authored and praveenkumar committed Jan 23, 2024
1 parent 6aae450 commit ced1abd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ RELEASE_INFO := release-info.json
CUSTOM_EMBED ?= false
EMBED_DOWNLOAD_DIR ?= tmp-embed

SELINUX_VOLUME_LABEL = :Z
ifeq ($(GOOS),darwin)
SELINUX_VOLUME_LABEL :=
endif

# Check that given variables are set and all have non-empty values,
# die with an error otherwise.
#
Expand Down Expand Up @@ -142,15 +147,15 @@ test-rpmbuild: spec

.PHONY: build_docs
build_docs:
${CONTAINER_RUNTIME} run -v $(CURDIR):/antora:Z --rm $(DOCS_BUILD_CONTAINER) --stacktrace antora-playbook.yml
${CONTAINER_RUNTIME} run -v $(CURDIR):/antora$(SELINUX_VOLUME_LABEL) --rm $(DOCS_BUILD_CONTAINER) --stacktrace antora-playbook.yml

.PHONY: docs_serve
docs_serve: build_docs
${CONTAINER_RUNTIME} run -it -v $(CURDIR)/docs/build:/usr/local/apache2/htdocs/:Z --rm -p 8088:80/tcp $(DOCS_SERVE_CONTAINER)
${CONTAINER_RUNTIME} run -it -v $(CURDIR)/docs/build:/usr/local/apache2/htdocs/$(SELINUX_VOLUME_LABEL) --rm -p 8088:80/tcp $(DOCS_SERVE_CONTAINER)

.PHONY: docs_check_links
docs_check_links:
${CONTAINER_RUNTIME} run -v $(CURDIR):/test:Z --rm $(DOCS_TEST_CONTAINER) -c .htmltest.yml
${CONTAINER_RUNTIME} run -v $(CURDIR):/test$(SELINUX_VOLUME_LABEL) --rm $(DOCS_TEST_CONTAINER) -c .htmltest.yml

.PHONY: clean_docs clean_macos_package
clean_docs:
Expand Down

0 comments on commit ced1abd

Please sign in to comment.