[beast: 1/8] DOCS: upload stable version docs to versioned directory instead of "latest/"



commit 4aa2d2daa9643588cfa83e7811a48814c28452e2
Author: Tim Janik <timj gnu org>
Date:   Wed Sep 16 09:56:00 2015 +0200

    DOCS: upload stable version docs to versioned directory instead of "latest/"

 docs/Makefile.am |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/docs/Makefile.am b/docs/Makefile.am
index f69f36f..08aac1c 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -5,12 +5,9 @@ SUBDIRS = imports images
 
 QPRINT = @printf '  %-7s%s\n'
 
-# Describe source tree version (release tag relative, e.g. yy.mm.z-nnn-gHEXHEX)
-DSC_VERSION = $(shell git describe --always --match '[0-9]*' HEAD 2>/dev/null)
-# Release version, shows last tag reachable
-REL_VERSION = $(shell git describe --always --abbrev=0 HEAD 2>/dev/null)
-# Detailed documentation version, falls back to package version for tarballs
-DOC_VERSION = $(or $(DSC_VERSION), $(VERSION))
+# Describe documentation version by real version number and git relative
+DSC_VERSION = $(shell git describe --always --match '[0-9]*' HEAD 2>/dev/null || echo tarball)
+DOC_VERSION = $(VERSION): $(DSC_VERSION)
 
 # == Extra Tarball Files ==
 EXTRA_DIST += bse-categories.txt interpolation.txt ChangeLog.svn
@@ -81,13 +78,11 @@ clean-local: doxygen-clean @INGIT@ clean-html
 
 # == Upload Rule ==
 CHECK_RSYNC = { command -v rsync >/dev/null && { echo "3.0.0" ; rsync --version 2>&1 | sed 's/[^0-9]*// ; 
1q' ; } | sort -VC ; }
-# Upload release versions as $DOC_VERSION, otherwise upload as latest/
+# Upload stable versions as $BST_VERSION_STEM, otherwise upload as latest/
 upload-docs: html/doc-version
        $(AM_V_GEN)
        $(Q) ${CHECK_RSYNC} || { echo "$@: failed to detect recent version: rsync"; exit 1; }
-       $(Q) test "${REL_VERSION}" != "${DSC_VERSION}" || { set -x ; \
-         rsync -zaHP --del "html/"   "testbit:pub/docs/beast/${DOC_VERSION}" ; }
-       $(Q) test "${REL_VERSION}"  = "${DSC_VERSION}" || { set -x ; \
-         rsync -zaHP --del "html/"   "testbit:pub/docs/beast/latest/" ; }
+       $(Q) docdir=latest && test "@ENABLE_DEVEL_MODE_TRUE@" != "#" || docdir="${BST_VERSION_STEM}" && \
+         set -x && rsync -zaHP --del "html/" "testbit:pub/docs/beast/$$docdir"
 upload: upload-docs
 .PHONY: upload upload-docs


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]