Add version number to output
This commit is contained in:
parent
092d0b013b
commit
9bde804da0
1 changed files with 4 additions and 2 deletions
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue