summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/options.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2015-12-03 22:22:17 +1100
committerChris Johns <chrisj@rtems.org>2015-12-03 22:25:00 +1100
commit47d703fd8c952f9a684a0a41faad81f5983acaaf (patch)
treedfcce9cf0e0979d95a4147499d04ab557909fedf /source-builder/sb/options.py
parentAdd RTEMS 4.12 build set (diff)
downloadrtems-source-builder-47d703fd8c952f9a684a0a41faad81f5983acaaf.tar.bz2
sb. Add VERSION support for releasing the RSB.
Add support to release the RSB by adding the VERSION file. The file is a single line with the version. Fix the reports to include the version. Update the INI file support to include the details of the build. Show the GIT or released version when the command starts. Closes #2480.
Diffstat (limited to 'source-builder/sb/options.py')
-rw-r--r--source-builder/sb/options.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/source-builder/sb/options.py b/source-builder/sb/options.py
index c611dfe..5835821 100644
--- a/source-builder/sb/options.py
+++ b/source-builder/sb/options.py
@@ -301,6 +301,12 @@ class command_line:
if path.exists(rsb_macros):
self.defaults.load(rsb_macros)
+ def sb_released(self):
+ if version.released():
+ self.defaults['is_rsb_released'] = '1'
+ self.defaults['_sbreleased'] = '1'
+ self.defaults['_sbversion'] = version.str()
+
def sb_git(self):
repo = git.repo(self.defaults.expand('%{_sbdir}'), self)
if repo.valid():
@@ -613,6 +619,7 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
for k in overrides:
o.defaults[k] = overrides[k]
+ o.sb_released()
o.sb_git()
o.rtems_options()
o.process()
@@ -623,7 +630,7 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
def run(args):
try:
_opts = load(args = args, defaults = 'defaults.mc')
- log.notice('RTEMS Source Builder - Defaults, v%s' % (version.str()))
+ log.notice('RTEMS Source Builder - Defaults, %s' % (version.str()))
_opts.log_info()
log.notice('Options:')
log.notice(str(_opts))