osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/31688 )

Change subject: Change upload path to project/master/
......................................................................

Change upload path to project/master/

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 can have manuals for each release:

  osmo-hlr/
  osmo-hlr/master/
  osmo-hlr/master/osmohlr-usermanual.pdf
  osmo-hlr/master/osmohlr-vty-reference.pdf

Related: OS#5902
Change-Id: Id090422afbd7b91ac78cc30e19372ac1c828cb6b
---
M build/Makefile.common.inc
1 file changed, 33 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  msuraev: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/build/Makefile.common.inc b/build/Makefile.common.inc
index 0fda918..a9a8ddf 100644
--- a/build/Makefile.common.inc
+++ b/build/Makefile.common.inc
@@ -12,6 +12,8 @@
 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 @@
 distclean: clean

 publish: $(UPLOAD_FILES)
-       rsync -avz -e "$(SSH_COMMAND)" $(UPLOAD_FILES) 
[email protected]:web-files/latest/
+       [ -n "$(OSMO_REPOSITORY)" ] || 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)" \
+                       [email protected]:web-files/
+       rm -rf "$(PUBLISH_TEMPDIR)"

 # Install and uninstall targets
 # Notes about OSMO_GSM_MANUALS_NO_INSTALL:

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/31688
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Id090422afbd7b91ac78cc30e19372ac1c828cb6b
Gerrit-Change-Number: 31688
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: msuraev <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to