andygrove commented on code in PR #2170: URL: https://github.com/apache/datafusion-comet/pull/2170#discussion_r2289592559
########## docs/Makefile: ########## @@ -19,20 +19,25 @@ # Minimal makefile for Sphinx documentation # -# You can set these variables from the command line, and also -# from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build -# Put it first so that "make" without argument is like "make help". +# Extract version from Cargo.toml (default) +PROJECT_VERSION := $(shell grep '^version' ../native/Cargo.toml | head -1 | cut -d '"' -f2) + help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -.PHONY: help Makefile +html: + @echo "Building docs for version $(PROJECT_VERSION)" + @PROJECT_VERSION=$(PROJECT_VERSION) $(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) +# Build docs and copy into versioned dir (like Spark does) +publish: html + @mkdir -p site/docs/$(PROJECT_VERSION) + @cp -r $(BUILDDIR)/html/* site/docs/$(PROJECT_VERSION)/ + @rm -rf site/docs/latest + @ln -s $(PROJECT_VERSION) site/docs/latest + @echo "Docs published under site/docs/$(PROJECT_VERSION) and site/docs/latest" Review Comment: I wonder if we should have two separate folders for the source content. We could have one folder for top-level content that is not specific to a particular version (main landing page and menu etc) and then a folder with all the version-specific content. What do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org