Skip to content

Commit

Permalink
Merge pull request #323 from kosack/master
Browse files Browse the repository at this point in the history
more fixes for version.py
  • Loading branch information
kosack authored Feb 6, 2017
2 parents 0364a5f + 97392de commit 6e8a5b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include README.rst
include CHANGES.rst
include ctapipe/VERSION

include setup.cfg

Expand Down
1 change: 1 addition & 0 deletions ctapipe/_version_cache.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version='0.3.3.post29+gitea50c1f'
7 changes: 3 additions & 4 deletions ctapipe/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
__all__ = ("get_version",)

CURRENT_DIRECTORY = path.dirname(path.abspath(__file__))
VERSION_FILE = path.join(CURRENT_DIRECTORY, "VERSION")
VERSION_FILE = path.join(CURRENT_DIRECTORY, "_version_cache.py")

GIT_COMMAND = "git"

Expand Down Expand Up @@ -107,8 +107,7 @@ def format_git_describe(git_str, pep440=False):
def read_release_version():
"""Read version information from VERSION file"""
try:
with open(VERSION_FILE, "r") as infile:
version = infile.read().strip()
from ._version_cache import version
if len(version) == 0:
version = None
return version
Expand All @@ -130,7 +129,7 @@ def update_release_version(pep440=False):
"""
version = get_version(pep440=pep440)
with open(VERSION_FILE, "w") as outfile:
outfile.write(version)
outfile.write("version='{}'".format(version))
outfile.write("\n")


Expand Down

0 comments on commit 6e8a5b4

Please sign in to comment.