Skip to content

Commit

Permalink
Add new conf
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed Apr 9, 2021
1 parent 97271a5 commit b1ffbdb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
26 changes: 12 additions & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,25 @@
copyright = '2020, Tilen MAJERLE'
author = 'Tilen MAJERLE'

# The full version, including alpha/beta/rc tags
version = 'v3.0.1'

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

# Decision for display version
try:
if git_branch.index('develop') >= 0:
version = "latest-develop"
except Exception:
print("Exception for index check")

# For debugging purpose
if git_branch == 'master' or git_branch == 'main':
version = os.popen('git describe --tags --abbrev=0').read().strip()
if version == '':
version = 'v0.0.0'
elif git_branch == 'develop':
version = 'latest-develop'
else:
version = 'branch-' + git_branch

# For debugging purpose only
print("GIT BRANCH: " + git_branch)
print("VERSION: " + version)
print("GIT VERSION: " + version)

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

Expand Down
2 changes: 1 addition & 1 deletion lwow/src/include/lwow/lwow.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* \file ow.h
* \file lwow.h
* \brief LwOW library
*/

Expand Down

0 comments on commit b1ffbdb

Please sign in to comment.