Add version number to output

This commit is contained in:
Tom Willemse 2013-12-16 01:27:13 +01:00
parent 092d0b013b
commit 9bde804da0

View file

@ -7,6 +7,8 @@ import sys
import pycommand
__version__ = '0.1.0'
def get_setting_specs(module):
sys.path.insert(0, os.getcwd())
@ -16,8 +18,8 @@ def get_setting_specs(module):
def write_settings(specs, out, values=None):
values = values or {}
print('# {file} file generated by topple'
.format(file=specs.OUTPUT_FILE), file=out)
print('# {file} file generated by topple v{version}'
.format(file=specs.OUTPUT_FILE, version=__version__), file=out)
for key, spec in specs.SETTINGS:
value = values.get(key, spec[1])