Skip to content

Commit

Permalink
docs: get version from debian changelog when version.h does not exist
Browse files Browse the repository at this point in the history
We now set the sphinx version variable from the debian changelog
version info when the version.h is not available.
  • Loading branch information
pstorz committed Dec 6, 2018
1 parent 1d97241 commit fa88a9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/manuals/en/new_main_reference/source/conf.py
Expand Up @@ -76,7 +76,7 @@
# auto detect version info from version.h
import os
release = os.popen('./get-version.sh').read()
version = release[:-2]
version = release[:4]
#print release
#print version

Expand Down
8 changes: 7 additions & 1 deletion docs/manuals/en/new_main_reference/source/get-version.sh
@@ -1,2 +1,8 @@
#!/bin/bash
grep "^#define VERSION" ../../../../../core/src/include/version.h | cut -b 17- | sed 's/"//g'

VERSION_H=../../../../../core/src/include/version.h
if [ -f ${VERSION_H} ]; then
grep "^#define VERSION" ${VERSION_H} | cut -b 17- | sed 's/"//g'
else
cd ../../../../ && dpkg-parsechangelog | grep Version | cut -b 10-
fi

0 comments on commit fa88a9e

Please sign in to comment.