Change in pysim[master]: contrib/jenkins.sh: Build and publish PDF manual

laforge gerrit-no-reply at lists.osmocom.org
Sun Apr 11 09:00:11 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/23714 )


Change subject: contrib/jenkins.sh: Build and publish PDF manual
......................................................................

contrib/jenkins.sh: Build and publish PDF manual

Change-Id: I3f01e93dd5a25d26feb3d067a171244a20f0f8e5
---
M contrib/jenkins.sh
M docs/Makefile
2 files changed, 25 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/14/23714/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index dc2692c..2d9653a 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -1,4 +1,10 @@
 #!/bin/sh
+# jenkins build helper script for pysim.  This is how we build on jenkins.osmocom.org
+#
+# environment variables:
+# * WITH_MANUALS: build manual PDFs if set to "1"
+# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
+#
 
 set -e
 
@@ -24,8 +30,12 @@
 pip install sphinx
 pip install sphinxcontrib-napoleon
 pip3 install -e 'git+https://github.com/osmocom/sphinx-argparse@master#egg=sphinx-argparse'
-(cd docs && make html)
+(cd docs && make html latexpdf)
 
 # run the test with physical cards
 cd pysim-testdata
 ../tests/pysim-test.sh
+
+if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
+	make -C "$base/docs" publish
+fi
diff --git a/docs/Makefile b/docs/Makefile
index d4bb2cb..dbc5276 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -8,13 +8,25 @@
 SOURCEDIR     = .
 BUILDDIR      = _build
 
+# for osmo-gsm-manuals
+OSMO_GSM_MANUALS_DIR=$(shell pkg-config osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null)
+OSMO_REPOSITORY = "pysim"
+UPLOAD_FILES = $(BUILDDIR)/latex/pysim.pdf
+CLEAN_FILES = $(UPLOAD_FILES)
+
 # Put it first so that "make" without argument is like "make help".
+.PHONY: help
 help:
 	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
-.PHONY: help Makefile
+$(BUILDDIR)/latex/pysim.pdf: latexpdf
+	@/bin/true
+
+# put this before the catch-all below
+include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
+
 
 # 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)

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23714
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3f01e93dd5a25d26feb3d067a171244a20f0f8e5
Gerrit-Change-Number: 23714
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210411/c39ef321/attachment.htm>


More information about the gerrit-log mailing list