Skip to content

Commit

Permalink
We want the year in the docs to always be current
Browse files Browse the repository at this point in the history
(cherry picked from commit f7f7d5c)
  • Loading branch information
foosel committed Aug 8, 2014
1 parent 9e2e616 commit 0176548
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
# serve to show the default.

import sys, os
import octoprint._version
from datetime import date

year_since = 2013
year_current = date.today().year

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -42,14 +47,13 @@

# General information about the project.
project = u'OctoPrint'
copyright = u'2013, Gina Häußge'
copyright = u'%d-%d, Gina Häußge' % (year_since, year_current) if year_current > year_since else u'%d, Gina Häußge' % year_since

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
import octoprint._version
version = octoprint._version.get_versions()["version"]
# The full version, including alpha/beta/rc tags.
release = version
Expand Down

0 comments on commit 0176548

Please sign in to comment.