Skip to content

Commit

Permalink
remove date from version string
Browse files Browse the repository at this point in the history
cause of side-effects e.g.:
user clone the repo and has the filter not installed
  • Loading branch information
jedie committed Jul 26, 2012
1 parent 3f42442 commit 978ce5d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 28 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

2 changes: 2 additions & 0 deletions README.creole
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ to:

== history

* v0.24.4
** remove date from version string, cause of side-effects e.g.: user clone the repo and has the filter not installed
* v0.24.3
** "Hardcode" the version string date attachment via [[https://github.com/jedie/python-code-snippets/tree/master/CodeSnippets/git|gitattribute filter script]] to fix [[https://github.com/jedie/django-tools/issues/1|a reported issues]] with [[https://github.com/pypa/pip/issues/145|pip requirements file bug]].
* v0.24.2
Expand Down
22 changes: 1 addition & 21 deletions django_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
# coding: utf-8

"""
we add the committer date to the version number by a .gitattributes filter
more info about this here:
https://github.com/jedie/python-code-snippets/tree/master/CodeSnippets/git/#readme
"""


import re


__version__ = (0, 24, 3)


COMMITTER_DATE = "$date$" # set by .gitattributes filter
DATE_REGEX = re.compile(r"\$date:(.*?)\$")

try:
__version__ += (DATE_REGEX.findall(COMMITTER_DATE)[0],)
except IndexError:
pass

__version__ = (0, 24, 4)
VERSION_STRING = '.'.join(str(part) for part in __version__)


Expand Down
6 changes: 0 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@

from setuptools import setup, find_packages

if "sdist" in sys.argv or "--version" in sys.argv:
# update the version string via gitattribute filter
import subprocess
subprocess.call(["rm", "django_tools/__init__.py"])
subprocess.call(["/usr/bin/git", "checkout", "django_tools/__init__.py"])

from django_tools import VERSION_STRING


Expand Down

0 comments on commit 978ce5d

Please sign in to comment.