Created
August 22, 2013 16:00
-
-
Save kgaughan/6309193 to your computer and use it in GitHub Desktop.
Sphinx makefile changes to aid with uploading to a PyPI-style documentation server. This creates a new target, 'upload', to build and upload documentation generated by Sphinx.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SPHINX_SERVER = https://pypidocs.example.com/ | |
SPHINX_NAME = handbook | |
upload: clean html | |
@which zip 2>&1 >/dev/null || (echo "zip required."; exit 1) | |
@which curl 2>&1 >/dev/null || (echo "curl required."; exit 1) | |
@( \ | |
echo "Uploading..."; \ | |
cd $(BUILDDIR)/html; \ | |
zip -9 --recurse-paths --quiet - . | \ | |
curl --form ":action=doc_upload" \ | |
--form "name=$(SPHINX_NAME)" \ | |
--form "content=@-" \ | |
$(SPHINX_SERVER) \ | |
) | |
.PHONY: upload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment