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 515f9c5 commit e9d3aa5
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 = '0.8.0'
version = ''

# 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 @@
ESP-AT Lib documentation!
=========================
ESP-AT Lib |version| documentation
==================================

Welcome to the documentation for version |version|.

ESP-AT Lib is generic, platform independent, library for control of *ESP8266* or *ESP32* WiFi-based microcontrollers from *Espressif systems*.
Its objective is to run on master system, while Espressif device runs official AT commands firmware developed and maintained by *Espressif systems*.
Expand Down

0 comments on commit e9d3aa5

Please sign in to comment.