doc/doxy-wrapper.sh: autodetect version
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sun, 1 Feb 2015 23:21:01 +0000 (00:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Feb 2015 04:04:14 +0000 (05:04 +0100)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/doxy-wrapper.sh

index bbdb909..9720e54 100755 (executable)
@@ -6,9 +6,16 @@ DOXYGEN="${3}"
 
 shift 3
 
+if [ -e "$SRC_PATH/VERSION" ]; then
+    VERSION=`cat "$SRC_PATH/VERSION"`
+else
+    VERSION=`cd "$SRC_PATH"; git describe`
+fi
+
 $DOXYGEN - <<EOF
 @INCLUDE        = ${DOXYFILE}
 INPUT           = $@
 EXAMPLE_PATH    = ${SRC_PATH}/doc/examples
 HTML_TIMESTAMP  = NO
+PROJECT_NUMBER  = $VERSION
 EOF