Support a common verion number for all commands.

This commit is contained in:
Chris Johns
2013-04-05 09:17:47 +11:00
parent 69e593825e
commit efb6688be0
5 changed files with 61 additions and 32 deletions

View File

@@ -37,6 +37,7 @@ try:
import log
import path
import setbuilder
import version
except KeyboardInterrupt:
print 'user terminated'
sys.exit(1)
@@ -44,11 +45,6 @@ except:
print 'error: unknown application load error'
sys.exit(1)
#
# Version of Sourcer Builder Build.
#
version = '0.1'
def _notice(opts, text):
if not opts.quiet() and not log.default.has_stdout():
print text
@@ -371,7 +367,7 @@ def run(args):
log.default = log.log(opts.logfiles())
if opts.get_arg('--output') and len(opts.params()) > 1:
raise error.general('--output can only be used with a single config')
print 'RTEMS Source Builder, Reporter v%s' % (version)
print 'RTEMS Source Builder, Reporter v%s' % (version.str())
if not check.host_setup(opts, _defaults):
_notice(opts, 'warning: forcing build with known host setup problems')
configs = build.get_configs(opts, _defaults)