Automatic versioning

This commit is contained in:
Manuel Ebert 2013-04-17 10:19:38 +02:00
parent 24f769cf66
commit b2a5b7b219
4 changed files with 23 additions and 3 deletions

View file

@ -5,6 +5,8 @@ Changelog
* [Improved] Installs pycrypto by default
* [Improved] Removed clint in favour of colorama
* [Fixed] Smaller fixes and typos
### 1.0.1 (March 12, 2013)
* [Fixed] Requires parsedatetime 1.1.2 or newer

View file

@ -44,7 +44,7 @@ The first time you run `jrnl` you will be asked where your journal file should b
Usage
-----
_jrnl_ has to modes: __composing__ and __viewing__.
_jrnl_ has two modes: __composing__ and __viewing__.
### Viewing:

View file

@ -1,5 +1,16 @@
#!/usr/bin/env python
# encoding: utf-8
"""
jrnl is a simple journal application for your command line.
"""
__title__ = 'jrnl'
__version__ = '1.0.2'
__author__ = 'Manuel Ebert'
__license__ = 'MIT License'
__copyright__ = 'Copyright 2013 Manuel Ebert'
from Journal import Journal
from jrnl import cli

View file

@ -51,9 +51,16 @@ if sys.argv[-1] == 'publish':
base_dir = os.path.dirname(os.path.abspath(__file__))
def get_version(filename="kerouac/__init__.py"):
with open(os.path.join(base_dir, filename)) as initfile:
for line in initfile.readlines():
m = re.match("__version__ *= *['\"](.*)['\"]", line)
if m:
return m.group(1)
setup(
name = "jrnl",
version = "1.0.1",
version = get_version(),
description = "A command line journal application that stores your journal in a plain text file",
packages = ['jrnl'],
install_requires = [