Changeset efb6688 in rtems-source-builder


Ignore:
Timestamp:
Apr 4, 2013, 10:17:47 PM (7 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
affea81
Parents:
69e5938
Message:

Support a common verion number for all commands.

Location:
source-builder/sb
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/build.py

    r69e5938 refb6688  
    3232import urlparse
    3333
    34 import check
    35 import config
    36 import defaults
    37 import error
    38 import execute
    39 import log
    40 import path
    41 
    42 #
    43 # Version of Sourcer Builder Build.
    44 #
    45 version = '0.1'
     34try:
     35    import check
     36    import config
     37    import defaults
     38    import error
     39    import execute
     40    import log
     41    import path
     42    import version
     43except KeyboardInterrupt:
     44    print 'abort: user terminated'
     45    sys.exit(1)
     46except:
     47    print 'error: unknown application load error'
     48    sys.exit(1)
    4649
    4750def _notice(opts, text):
     
    516519        opts, _defaults = defaults.load(args, optargs)
    517520        log.default = log.log(opts.logfiles())
    518         _notice(opts, 'RTEMS Source Builder, Package Builder v%s' % (version))
     521        _notice(opts, 'RTEMS Source Builder, Package Builder v%s' % (version.str()))
    519522        if not check.host_setup(opts, _defaults):
    520523            if not opts.force():
  • source-builder/sb/check.py

    r69e5938 refb6688  
    2929import log
    3030import path
    31 
    32 #
    33 # Version of Sourcer Builder Check.
    34 #
    35 version = '0.1'
     31import version
    3632
    3733def _notice(opts, text):
     
    141137    try:
    142138        _opts, _defaults = defaults.load(args = sys.argv)
     139        _notice(_opts, 'RTEMS Source Builder - Check, v%s' % (version.str()))
    143140        if host_setup(_opts, _defaults):
    144             print 'RTEMS Source Builder environment is ok'
     141            print 'Environment is ok'
    145142        else:
    146             print 'RTEMS Source Builder environment is not correctly set up'
     143            print 'Environment is not correctly set up'
    147144    except error.general, gerr:
    148145        print gerr
  • source-builder/sb/reports.py

    r69e5938 refb6688  
    3838    import path
    3939    import setbuilder
     40    import version
    4041except KeyboardInterrupt:
    4142    print 'user terminated'
     
    4445    print 'error: unknown application load error'
    4546    sys.exit(1)
    46 
    47 #
    48 # Version of Sourcer Builder Build.
    49 #
    50 version = '0.1'
    5147
    5248def _notice(opts, text):
     
    372368        if opts.get_arg('--output') and len(opts.params()) > 1:
    373369            raise error.general('--output can only be used with a single config')
    374         print 'RTEMS Source Builder, Reporter v%s' % (version)
     370        print 'RTEMS Source Builder, Reporter v%s' % (version.str())
    375371        if not check.host_setup(opts, _defaults):
    376372            _notice(opts, 'warning: forcing build with known host setup problems')
  • source-builder/sb/setbuilder.py

    r69e5938 refb6688  
    3939    import path
    4040    import reports
     41    import vrrsion
    4142except KeyboardInterrupt:
    4243    print 'abort: user terminated'
     
    4546    print 'error: unknown application load error'
    4647    sys.exit(1)
    47 
    48 #
    49 # Version of RTEMS Source Builder Set Builder.
    50 #
    51 version = '0.1'
    5248
    5349def _trace(opts, text):
     
    367363        opts, _defaults = defaults.load(sys.argv, optargs)
    368364        log.default = log.log(opts.logfiles())
    369         _notice(opts, 'RTEMS Source Builder - Set Builder, v%s' % (version))
     365        _notice(opts, 'RTEMS Source Builder - Set Builder, v%s' % (version.str()))
    370366        if not check.host_setup(opts, _defaults):
    371367            raise error.general('host build environment is not set up correctly')
Note: See TracChangeset for help on using the changeset viewer.