Skip to content

Commit

Permalink
Add text for version on main page
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed Feb 16, 2020
1 parent a004c9c commit 77adda7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@
author = 'Tilen MAJERLE'

# The full version, including alpha/beta/rc tags
release = '1.2.0'
version = '1.2.0'

# Try to get branch at which this is running
# and try to determine which version to display in sphinx
git_branch = ''
res = os.popen('git branch').read().strip()
for line in res.split("\n"):
if line[0] == '*':
git_branch = line[1:].strip()
if git_branch == 'develop' or git_branch == 'origin/develop':
version = "latest-develop"

# -- General configuration ---------------------------------------------------

Expand Down
6 changes: 4 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
GPS NMEA Parser documentation!
==============================
GPS NMEA Parser |version| documentation
=======================================

Welcome to the documentation for version |version|.

GPS NMEA Parser is lightweight, platform independent library to parse NMEA statements from GPS receivers. It is highly optimized for embedded systems.

Expand Down

0 comments on commit 77adda7

Please sign in to comment.