aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-03-06 16:27:00 +0100
committerOliver Smith <osmith@sysmocom.de>2023-03-06 16:42:23 +0100
commit4c0f4d7ae4cee3b1fdd14499de71d7e4a24cd1d1 (patch)
treefaf805ed7008e784053fa012d83276bd3c5c7d57
parentd306b4da297f74ad0cd372a20ad5fe6627300e4f (diff)
Change upload path to project/master/osmith/wip
Don't upload the manuals for master to "latest" anymore, this is confusing given that we also refer to the most recent release as "latest". Add the "master" directory to prepare a directory structure where we have manuals for each release. Related: OS#5902 Change-Id: Id090422afbd7b91ac78cc30e19372ac1c828cb6b
-rw-r--r--build/Makefile.common.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/build/Makefile.common.inc b/build/Makefile.common.inc
index 0fda918..fa2dfc0 100644
--- a/build/Makefile.common.inc
+++ b/build/Makefile.common.inc
@@ -12,6 +12,8 @@ SYMLINKS = common build
CLEAN_FILES += $(SYMLINKS)
PDF_FILES = $(patsubst %.adoc,%.pdf,$(ASCIIDOC)) $(patsubst %.xml,%.pdf,$(VTY_REFERENCE))
OSMO_REPOSITORY ?= osmo-gsm-manuals
+PUBLISH_REF ?= master
+PUBLISH_TEMPDIR = _publish_tmpdir
# Prefix (Makefile.am sets this to configure's --prefix when including)
prefix ?= /usr/local
@@ -28,7 +30,17 @@ clean:
distclean: clean
publish: $(UPLOAD_FILES)
- rsync -avz -e "$(SSH_COMMAND)" $(UPLOAD_FILES) docs@ftp.osmocom.org:web-files/latest/
+ [ -n "$(OSMO_REPOSITORY)" && -n "$(PUBLISH_REF)" ] || exit 1
+ rm -rf "$(PUBLISH_TEMPDIR)"
+ mkdir -p "$(PUBLISH_TEMPDIR)/$(OSMO_REPOSITORY)/$(PUBLISH_REF)"
+ cp $(UPLOAD_FILES) "$(PUBLISH_TEMPDIR)/$(OSMO_REPOSITORY)/$(PUBLISH_REF)"
+ cd "$(PUBLISH_TEMPDIR)" && \
+ rsync \
+ -avzR \
+ -e "$(SSH_COMMAND)" \
+ "$(OSMO_REPOSITORY)" \
+ docs@ftp.osmocom.org:web-files/
+ rm -rf "$(PUBLISH_TEMPDIR)"
# Install and uninstall targets
# Notes about OSMO_GSM_MANUALS_NO_INSTALL: