summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
Diffstat (limited to 'alot')
-rw-r--r--alot/__init__.py5
-rw-r--r--alot/version.py8
2 files changed, 6 insertions, 7 deletions
diff --git a/alot/__init__.py b/alot/__init__.py
index 7575f5cb..bef59344 100644
--- a/alot/__init__.py
+++ b/alot/__init__.py
@@ -1,8 +1,7 @@
-
-from version import get_git_version
+from version import read_version
__productname__ = 'alot'
-__version__ = get_git_version()
+__version__ = read_version()
__copyright__ = "Copyright (C) 2011 Patrick Totzke"
__author__ = "Patrick Totzke"
__author_email__ = "patricktotzke@gmail.com"
diff --git a/alot/version.py b/alot/version.py
index 40e64bb4..1506c137 100644
--- a/alot/version.py
+++ b/alot/version.py
@@ -62,7 +62,7 @@ def call_git_describe(abbrev=4):
return None
-def read_release_version():
+def read_version():
try:
f = open(VERSIONFILE, "r")
@@ -77,7 +77,7 @@ def read_release_version():
return None
-def write_release_version(version):
+def write_version(version):
f = open(VERSIONFILE, "w")
f.write("%s\n" % version)
f.close()
@@ -85,7 +85,7 @@ def write_release_version(version):
def get_git_version(abbrev=4):
# Read in the version that's currently in VERSION.
- release_version = read_release_version()
+ release_version = read_version()
# First try to get the current version using “git describe”.
version = call_git_describe(abbrev)
@@ -105,7 +105,7 @@ def get_git_version(abbrev=4):
# RELEASE-VERSION file, update the file to be current.
if version != release_version:
- write_release_version(version)
+ write_version(version)
# Finally, return the current version.
return version