Skip to content

Commit

Permalink
If git reports dirty, display what it's complaining about. To trouble…
Browse files Browse the repository at this point in the history
…shoot readthedocs integration
  • Loading branch information
glennmatthews committed Feb 19, 2015
1 parent 9a53d70 commit a2a3c1b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import re
import sys
import os

Expand Down Expand Up @@ -71,12 +72,17 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
from COT._version import get_versions # noqa
from COT._version import get_versions, run_command # noqa
# The full version, including alpha/beta/rc tags.
release = get_versions()["version"]
# The short X.Y version.
version = release.split("+")[0]

if re.search("dirty", release):
print(run_command(["git"], ["describe", "--tags", "--dirty",
"--always", "--long"]))
print(run_command(["git"], ["diff"]))

print("\n".join([project, version, release]))

# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down

0 comments on commit a2a3c1b

Please sign in to comment.